Sencha SDK Tools does not Minified app-all.js - extjs4

I'm using Sencha SDK Tools 2 Beta 3 and ExtJS 4.0.7 in Windows 7 64bit.
After I build my project, the app-all.js file is not minified.
This is the .JSB3 file (that was generated by Sencha):
{
"projectName": "Project Name",
"licenseText": "Copyright(c) 2012 Company Name",
"builds": [
{
"name": "All Classes",
"target": "all-classes.js",
"options": {
"debug": true
},
"files": [
// All Classes
]
},
{
"name": "Application - Production",
"target": "app-all.js",
"compress": true,
"files": [
{
"path": "",
"name": "all-classes.js"
},
{
"path": "",
"name": "app.js"
}
]
}
],
"resources": []
}
And Sencha result in command prompt: (Without Errors)
Loaded 2 Builds
Creating the "All Classes" target as "all-classes.js"
- 256 file(s) included in this target.
+ // All Classes
* Parse all-classes.js with options:
- debug: true
- debugLevel: 1
Creating the "Application - Production" target as "app-all.js"
- 2 file(s) included in this target.
+ all-classes.js
+ app.js
* Parse app-all.js with options:
- debug: false
- debugLevel: 1
* Compress and obfuscate app-all.js...
Copy resources...
Done building!
FUI: My file has Unicode characters.
Thank you in Advance.
Update: (Folder Structure, Simplified)
MyApp
- app
-- controller
--- mycontroller.js
-- model
--- mymodel.js
-- store
--- mystore.js
-- view
--- myview.js
- ext
- app.js
- index.html
(Folders don't have file extensions)

It was about an internal error.
I've replaced float with 'float' in my JS File and now it works.

Related

Using renovate to update TYPO3 installations minor/patches only

I have been experimenting with Renovate and would like to use it to auto update TYPO3 to the latest version. v10.4.x - where Renovate should only create MR's whenever the is an update available for the 'X' part.
I am using the following configuration:
config.js
module.exports = {
endpoint: 'https://gitlab.companyname/api/v4/',
token: '**gitlab_token**',
platform: 'gitlab',
baseBranches: ["master"],
assignees: ["Me"],
enabledManagers: "composer",
onboardingConfig: {
extends: ['config:base'],
},
repositories: [
{
repository: 'CMS/sitetemplate',
},
],
};
renovate.json in the project CMS/sitetemplate
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":disableDependencyDashboard",
":separatePatchReleases"
],
"prHourlyLimit": 0,
"prConcurrentLimit": 0,
"baseBranches": [
"master"
],
"enabledManagers": [
"composer"
],
"commitMessagePrefix": "[TASK] ",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": " ({{{displayFrom}}} => {{{displayTo}}})",
"rangeStrategy": "update-lockfile",
"packageRules": [
{
"matchUpdateTypes": [
"patch"
],
"matchPackagePrefixes": [
"typo3/cms-"
],
"excludePackageNames": [
"typo3/cms-cli",
"typo3/cms-composer-installers"
],
"groupName": "TYPO3 CMS",
"labels": [
"typo3"
]
},
{
"matchUpdateTypes": [
"minor",
"pin",
"digest",
"major"
],
"enabled": false
}
]
}
.gitlab-ci.yaml
Update Web Project:
rules:
- if: $RENOVATE_APPLICATION_TOKEN
when: never
- if: $RENOVATE_WEB_TOKEN
when: manual
variables:
RENOVATE_TOKEN: $RENOVATE_WEB_TOKEN
script:
- renovate $RENOVATE_EXTRA_FLAGS
when: manual
I have played around with the config a bit and it will create MR's, issues etc when i have other settings. So its working. However with the current configuration it does not create a PR.
The sitetemplate currently has TYPO3 V10.4.25 (in lock file) and i want it to create a PR so it will update all typo3/cms-* packages to the lastest TYPO3 V10.4.32
It should only update the lock file.
Currently when i run the CI i get no MR's and the following output
The CI output
PASTEBIN since it was to large
Anyone has any expirience with this, what configuration am i doing wrong?
https://github.com/renovatebot/renovate/discussions/17939
Confirmed working:
At a quick glance I think you're missing a setting of separateMinorPatch=true. You could turn that on globally (if you want to separate patch updates from minor for all packages) or specifically for certain packages by using packageRules.

How can i custom config CHANGELOG.md using standard-version npm package?

I'm using the command standard-version each time I want to publish new version, but the yielded changes in the CHANGELOG.md look like this:
### [10.1.9](https://github.com/my-project-name/compare/v10.1.8...v10.1.9) (2021-03-29)
### [10.1.8](https://github.com/my-project-name/compare/v10.1.7...v10.1.8) (2021-03-29)
### [10.1.7](https://github.com/my-project-name/compare/v10.1.6...v10.1.7) (2021-03-29)
first the links do not work - the github url is not correct and i want to configure it to the right url, and second, I'd like to configure the link that's shown in the changeslog file (there are some types)
I tried to use this documentation but didn't find anything that can help me
https://github.com/conventional-changelog/conventional-changelog
so how do I configure the way standard-version works on the CHANGELOG.md ? can someone provide example?
yes.
according to doc:
You can configure standard-version either by:
Placing a standard-version stanza in your package.json (assuming your project is JavaScript).
Creating a .versionrc, .versionrc.json or .versionrc.js.
If you are using a .versionrc.js your default export must be a configuration object, or a function returning a configuration object.
Any of the command line parameters accepted by standard-version can instead be provided via configuration.
Please refer to the conventional-changelog-config-spec for details on available configuration options.
example:
.versionrc
{
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"hidden": true
},
{
"type": "docs",
"hidden": true
},
{
"type": "style",
"hidden": true
},
{
"type": "refactor",
"section": "Refactor"
},
{
"type": "perf",
"section": "Performance"
},
{
"type": "test",
"hidden": true
}
]
}

How to setup Sentry-cli source maps with react-native

Introduction
Hi, I'm trying to get Sentry to recognise our sourcemaps in a react-native project, but I can't get it working.
The artifacts are uploading - I can see them in the WebUI, but the events lack context/mapping:
Question
Can anyone see any problems in my setup?
Thanks!
 Background
Assumptions
uploading release artifacts, then deleting artifacts from web ui, then re-uploading new artifacts is valid
"abs_path": "app:///index.bundle", requires the bundled js needs to be renamed to index.bundle
That fact that all events have a processing error: Discarded invalid parameter 'dist' should not effect sourcemaps
Once everything lines up, all my historical events for the release will benefit from the uploaded files/sourcemaps
Xcode build phase
During the XCode build phase we already bundle the DSym.
In this script, I'm trying to pull out the bundled js and sourcemap, and uploading it.
Script
#!/bin/bash
# WARNING: Run directly from Xcode
# For testing of Xcode bundling/sentry locally, set to "true"
DEBUG_FORCE_BUNDLING="true"
printf "Xcode: Bundle react-native and upload to Sentry"
source ../scripts/xcode/utils/node_activate.sh
# Create bundle and sourcemap
export NODE_BINARY=node
export SENTRY_PROPERTIES=sentry.properties
DEST=$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH
export EXTRA_PACKAGER_ARGS="--sourcemap-output $DEST/main.bundle.map.js";
if [ "${CONFIGURATION}" = "Release" ]; then
FORCE_BUNDLING="$DEBUG_FORCE_BUNDLING" \
../node_modules/#sentry/cli/sentry-cli react-native xcode \
../node_modules/react-native/scripts/react-native-xcode.sh
else
FORCE_BUNDLING="$DEBUG_FORCE_BUNDLING" \
../node_modules/#sentry/cli/sentry-cli react-native xcode \
../node_modules/react-native/scripts/react-native-xcode.sh
fi
# Copy bundle & sourcemap
mkdir -p ../.xcodebuild
cp $DEST/main.jsbundle ../.xcodebuild/index.bundle # rename?
cp $DEST/main.bundle.map.js ../.xcodebuild
echo "Size of file $(wc -c ../.xcodebuild/index.bundle)" # RENAME!?
echo "Size of sourcemap $(wc -c ../.xcodebuild/main.bundle.map.js)"
# Upload sentry release
# https://docs.sentry.io/cli/releases/#creating-releases
APP_IDENTIFIER="com.mycompany.app"
VERSION="1.4.21"
RELEASE_NAME="$APP_IDENTIFIER-$VERSION"
DISTRIBUTION_NAME="2400"
function sentry_release {
npx sentry-cli releases \
files $RELEASE_NAME \
$1 $2 $3
--dist $DISTRIBUTION_NAME \
--strip-prefix ".build" \
--ignore node_modules \
--rewrite "$(pwd)"
}
sentry_release upload ../.xcodebuild/index.bundle '~/index.bundle'
echo "sentry_release upload"
sentry_release upload-sourcemaps ../.xcodebuild/main.bundle.map.js
echo "sentry_release upload-sourcemaps"
echo `date`
echo "DONE"
Note: The important bit of node_modules/react-native/scripts/react-native-xcode.sh is:
BUNDLE_FILE="$DEST/main.jsbundle"
echo "BUNDLE_FILE: $BUNDLE_FILE" > ~/bh/react-native-native/bundle.log
"$NODE_BINARY" $NODE_ARGS "$CLI_PATH" $BUNDLE_COMMAND \
$CONFIG_ARG \
--entry-file "$ENTRY_FILE" \
--platform ios \
--dev $DEV \
--reset-cache \
--bundle-output "$BUNDLE_FILE" \
--assets-dest "$DEST" \
$EXTRA_PACKAGER_ARGS
Script output
Xcode: Upload Debug Symbols to SentryNow using node v11.11.0 (npm v6.7.0)
FORCE_BUNDLING enabled; continuing to bundle.
warning: the transform cache was reset.
Loading dependency graph, done.
info Writing bundle output to:, /Users/me/Library/Developer/Xcode/DerivedData/TheApp-cvfhlrosjrphnjdcngyqxnlmjjbb/Build/Products/Debug-iphonesimulator/TheApp.app/main.jsbundle
info Writing sourcemap output to:, /Users/me/Library/Developer/Xcode/DerivedData/TheApp-cvfhlrosjrphnjdcngyqxnlmjjbb/Build/Products/Debug-iphonesimulator/TheApp.app/main.bundle.map.js
info Done writing bundle output
info Done writing sourcemap output
info Copying 109 asset files
info Done copying assets
Size of file 8477623 ../.xcodebuild/index.bundle
Size of sourcemap 15378754 ../.xcodebuild/main.bundle.map.js
A 560eaee15f0c1ccb5a57b68b5dc1b4944cff84d2 (8477623 bytes)
sentry_release upload
> Analyzing 1 sources
> Adding source map references
> Uploading source maps for release com.mycompany.app-1.4.21
Source Map Upload Report
Source Maps
~/main.bundle.map.js
sentry_release upload-sourcemaps
Fri May 3 15:50:26 BST 2019
DONE
Sentry event JSON
Trimmed some breadcrumbs/callstack:
// 20190503154011
// https://sentry.mycompany.com/mycompany/react-native-app/issues/4205/events/396945/json/
{
"id": "1c754ed7d651445eb48ed79c995073e2",
"project": 11,
"release": "com.mycompany.app-1.4.21",
"platform": "cocoa",
"culprit": "crash(app:///index.bundle)",
"message": "Error Sentry: TEST crash crash(app:///index.bundle)",
"datetime": "2019-05-03T14:32:25.000000Z",
"time_spent": null,
"tags": [
[
"logger",
"javascript"
],
[
"sentry:user",
"id:b5f212b4-9112-4253-86cc-11583ac1945a"
],
[
"sentry:release",
"com.mycompany.app-1.4.21"
],
[
"level",
"fatal"
],
[
"device",
"iPhone9,1"
],
[
"device.family",
"iOS"
],
[
"os",
"iOS 12.1"
],
[
"os.name",
"iOS"
],
[
"os.rooted",
"no"
]
],
"contexts": {
"device": {
"model_id": "simulator",
"family": "iOS",
"simulator": true,
"type": "device",
"storage_size": 499963170816,
"free_memory": 274915328,
"memory_size": 17179869184,
"boot_time": "2019-04-29T07:53:06Z",
"timezone": "GMT+1",
"model": "iPhone9,1",
"usable_memory": 16463810560,
"arch": "x86"
},
"app": {
"app_version": "1.4.21",
"app_name": "MyApp",
"device_app_hash": "<device_app_hash>",
"app_id": "<app_id>",
"app_build": "2400",
"app_start_time": "2019-05-03T14:31:33Z",
"app_identifier": "com.mycompany.app",
"type": "default",
"build_type": "simulator"
},
"os": {
"rooted": false,
"kernel_version": "Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64",
"version": "12.1",
"build": "17G65",
"type": "os",
"name": "iOS"
}
},
"errors": [
{
"type": "invalid_attribute",
"name": "dist"
}
],
"extra": {
"session:duration": 52129
},
"fingerprint": [
"{{ default }}"
],
"metadata": {
"type": "Error",
"value": "Sentry: TEST crash"
},
"received": 1556893946.0,
"sdk": {
"client_ip": "109.69.86.251",
"version": "0.42.0",
"name": "sentry.javascript.react-native"
},
"sentry.interfaces.Breadcrumbs": {
"values": [
{
"category": "console",
"timestamp": 1556893700.0,
"message": "%c prev state color: #9E9E9E; font-weight: bold [object Object]",
"type": "default"
},
{
"category": "console",
"timestamp": 1556893941.0,
"message": "%c prev state color: #9E9E9E; font-weight: bold [object Object]",
"type": "default"
},
{
"category": "console",
"timestamp": 1556893941.0,
"message": "%c next state color: #4CAF50; font-weight: bold [object Object]",
"type": "default"
},
{
"category": "sentry",
"timestamp": 1556893945.0,
"message": "Error: Sentry: TEST crash",
"type": "default",
"level": "fatal"
}
]
},
"sentry.interfaces.Exception": {
"exc_omitted": null,
"values": [
{
"stacktrace": {
"frames": [
{
"function": "callFunctionReturnFlushedQueue",
"platform": "javascript",
"abs_path": "app:///[native code]",
"in_app": false,
"filename": "app:///[native code]"
},
{
"function": "touchableHandlePress",
"abs_path": "app:///index.bundle",
"in_app": false,
"platform": "javascript",
"lineno": 64988,
"colno": 47,
"filename": "app:///index.bundle"
},
{
"function": "crash",
"abs_path": "app:///index.bundle",
"in_app": false,
"platform": "javascript",
"lineno": 93710,
"colno": 22,
"filename": "app:///index.bundle"
}
],
"has_system_frames": false,
"frames_omitted": null
},
"mechanism": null,
"raw_stacktrace": null,
"value": "Sentry: TEST crash",
"thread_id": 99,
"module": null,
"type": "Error"
}
]
},
"sentry.interfaces.User": {
"id": "b5f212b4-9112-4253-86cc-11583ac1945a"
},
"type": "error",
"version": "7"
}
Artifacts
Web UI
Cut and pasted from Release artifacts page:
Release com.mycompany.app-1.4.21
Artifacts
NAME SIZE
~/index.bundle 8.1 MB
~/main.bundle.map.js 14.7 MB
sourceMappingURL
$ tail -c 50 .xcodebuild/main.jsbundle
//# sourceMappingURL=main.bundle.map.js
After MONTHS, we realised we had to write client code to knit in the Distribution and Release....
const configureSentry = () => {
Sentry.config(config.sentry.dsn).install();
Sentry.setDist(DeviceInfo.getBuildNumber());
Sentry.setRelease(DeviceInfo.getBundleId() + '-' + DeviceInfo.getVersion());
};

VS code debugging ASP.NET + Chrome

Is it possible to configure VS code to debug seamlessly solutions with server code in ASP.NET Core and JS files in Chrome.
Something available in full VS (unfortunately only in IE).
I can put breakpoints on both JS files and CS files.
Thanks for help!
Create one configuration for the ASP.NET Core application and another one for Chrome (you need the Debugger for Chrome extension). Then create a composite launch configuration.
When you start debugging using the composite configuration you will be able to debug the ASP.NET code as well as the Javascript/Typescript code in the same Visual Studio Code instance. You can also launch each configuration manually and it should work.
Your launch.json file should look something like this (with an ASP.NET Core application called myapp):
{
"version": "0.2.0",
"compounds": [
{
"name": "Browser/Server",
"configurations": [
"Server",
"Browser"
]
}
],
"configurations": [
{
"name": "Server",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/bin/Debug/netcoreapp1.1/myapp.dll",
"args": [],
"cwd": "${workspaceRoot}",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceRoot}/Views"
}
},
{
"name": "Browser",
"type": "chrome",
"request": "launch",
"url": "http://localhost:5000",
"webRoot": "${workspaceRoot}/wwwroot"
},
]
}
Simple way :
Close IE but debuging are Running
Choose Lunch Chrome (must config lunch.json URL same )

What is the proper way to load an external javascript in Sencha Touch 2

In my development I need to include third part javascripts; like money.js (http://josscrowcroft.github.com/money.js/)
What is the best 'clean'/'proper' way to achieve it ? Just include it in index.html ?
No. Don't directly add the additional javascript files in the index.html file. That is not the recommended way (though it may work).
Instead, do like this,
Include the following line in your index.html. microloader is the folder that is shipped with sencha sdk and contains three files mainly, development.js, production.js and testing.js , each one for it's own purpose.
< script id ="microloader" type="text/javascript" src="../../microloader/development.js"> < /script >
Then, in your <appname> folder, you will need to have a file called as app.json. It will look something like this ..
{
"name": "Sencha",
// All javascript files go here ...
"js": [
{
"path": "../../sencha-touch-all-debug.js"
},
{
"path": "app.js",
"update": "delta"
},
{
"path": "http://josscrowcroft.github.com/money.js/",
"update": "delta"
}
],
"css": [
{
"path": "../../resources/css/sencha-touch.css",
"update": "delta"
},
{
"path": "resources/css/app.css",
"update": "delta"
}
],
.....
.....
.....
}
If you are using Sencha Cmd your index.html may look like this:
<!-- The line below must be kept intact for Sencha Command to build your application -->
<script id="microloader" type="text/javascript" src=".sencha/app/microloader/development.js"></script>
So after changing app.json you'll need to refresh your app:
sencha app refresh
Pure javascript did the trick for me. I just included this block of code in the launch function:
var scriptTag = document.createElement('script');
scriptTag.src = 'specify the path here...';
document.body.appendChild(scriptTag);
The scriptTag gets appended into the body of your index file.
The following worked for me with Ext JS 5.0.0, if the external JavaScript library is local. After the editing, run "sencha app build"
Make changes to three JSON elememtns in app.json.
(1) js
(2) css
(3) resources
{
"name": "Sencha",
// All javascript files go here ...
"js": [
{
"path": "app.js",
"bundle": true
},
{
"path": "leaflet/leaflet.js",
"bundle": true
}
],
"css": [
{
"path": "bootstrap.css",
"bootstrap": true
},
{
"path": "leaflet/leaflet.css",
"bootstrap": true
}
],
.....
/**
* Extra resources to be copied along when build
*/
"resources": [""leaflet/leaflet.js","leaflet/leaflet.css"
],
.....
.....
}