feat: Scoped Packages (#7911)
* chore: move tns-core-modules to nativescript-core * chore: preparing compat generate script * chore: add missing definitions * chore: no need for http-request to be private * chore: packages chore * test: generate tests for tns-core-modules * chore: add anroid module for consistency * chore: add .npmignore * chore: added privateModulesWhitelist * chore(webpack): added bundle-entry-points * chore: scripts * chore: tests changed to use @ns/core * test: add scoped-packages test project * test: fix types * test: update test project * chore: build scripts * chore: update build script * chore: npm scripts cleanup * chore: make the compat pgk work with old wp config * test: generate diff friendly tests * chore: create barrel exports * chore: move files after rebase * chore: typedoc config * chore: compat mode * chore: review of barrels * chore: remove tns-core-modules import after rebase * chore: dev workflow setup * chore: update developer-workflow * docs: experiment with API extractor * chore: api-extractor and barrel exports * chore: api-extractor configs * chore: generate d.ts rollup with api-extractor * refactor: move methods inside Frame * chore: fic tests to use Frame static methods * refactor: create Builder class * refactor: use Builder class in tests * refactor: include Style in ui barrel * chore: separate compat build script * chore: fix tslint errors * chore: update NATIVESCRIPT_CORE_ARGS * chore: fix compat pack * chore: fix ui-test-app build with linked modules * chore: Application, ApplicationSettings, Connectivity and Http * chore: export Trace, Profiling and Utils * refactor: Static create methods for ImageSource * chore: fix deprecated usages of ImageSource * chore: move Span and FormattedString to ui * chore: add events-args and ImageSource to index files * chore: check for CLI >= 6.2 when building for IOS * chore: update travis build * chore: copy Pod file to compat package * chore: update error msg ui-tests-app * refactor: Apply suggestions from code review Co-Authored-By: Martin Yankov <m.i.yankov@gmail.com> * chore: typings and refs * chore: add missing d.ts files for public API * chore: adress code review FB * chore: update api-report * chore: dev-workflow for other apps * chore: api update * chore: update api-report


36
.gitignore
vendored
@ -6,14 +6,16 @@ libs
|
|||||||
node_modules
|
node_modules
|
||||||
package
|
package
|
||||||
platforms
|
platforms
|
||||||
!tns-core-modules/platforms
|
!nativescript-core/platforms
|
||||||
reports
|
reports
|
||||||
tags
|
tags
|
||||||
|
temp
|
||||||
|
|
||||||
# Files
|
# Files
|
||||||
package-lock.json
|
package-lock.json
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.nsbuildinfo
|
.nsbuildinfo
|
||||||
|
tsdoc-metadata.json
|
||||||
|
|
||||||
# IDEs and editors
|
# IDEs and editors
|
||||||
/.idea
|
/.idea
|
||||||
@ -23,6 +25,7 @@ package-lock.json
|
|||||||
*.launch
|
*.launch
|
||||||
.settings/
|
.settings/
|
||||||
.atom
|
.atom
|
||||||
|
.ctags-exclude
|
||||||
|
|
||||||
# IDE - VSCode
|
# IDE - VSCode
|
||||||
.vscode/*
|
.vscode/*
|
||||||
@ -51,23 +54,20 @@ tscommand*.tmp.txt
|
|||||||
|
|
||||||
# Other
|
# Other
|
||||||
*.js
|
*.js
|
||||||
|
!tns-core-modules-package/**/*.js
|
||||||
# https://github.com/NativeScript/nativescript-dev-webpack/issues/932
|
# https://github.com/NativeScript/nativescript-dev-webpack/issues/932
|
||||||
!tns-core-modules/xml/xml.js
|
!nativescript-core/xml/xml.js
|
||||||
!tests/hooks/**/*.*
|
!tests/hooks/**/*.*
|
||||||
!js-libs/**/*.*
|
!nativescript-core/js-libs/**/*.*
|
||||||
!css/**/*.*
|
!nativescript-core/cli-hooks/**/*.*
|
||||||
!css-value/**/*.*
|
!nativescript-core/css/**/*.*
|
||||||
!fetch/**/*.*
|
nativescript-core/css/parser.js*
|
||||||
!apps/TelerikNEXT/lib/**/*.*
|
nativescript-core/css/system-classes.js*
|
||||||
!build/**/*.*
|
!nativescript-core/css-value/**/*.*
|
||||||
|
!nativescript-core/fetch/**/*.*
|
||||||
|
!nativescript-core/build/**/*.*
|
||||||
|
|
||||||
|
#generated by api-extractor
|
||||||
|
nativescript-core/nativescript-core.d.ts
|
||||||
|
|
||||||
.vs/
|
.vs/
|
||||||
|
|
||||||
.baseDir.ts
|
|
||||||
.ctags-exclude
|
|
||||||
|
|
||||||
TestRunResult.txt
|
|
||||||
.testsapprun
|
|
||||||
|
|
||||||
tns-core-modules.base.d.ts
|
|
||||||
tns-core-modules.d.ts
|
|
||||||
tns-core-modules.es6.d.ts
|
|
||||||
|
11
.travis.yml
@ -2,12 +2,13 @@ language: node_js
|
|||||||
node_js:
|
node_js:
|
||||||
- "node"
|
- "node"
|
||||||
script:
|
script:
|
||||||
|
- npm install
|
||||||
|
- npm run tslint
|
||||||
|
- npm run setup
|
||||||
|
- npm run unit-test
|
||||||
|
|
||||||
# circular references check
|
# circular references check
|
||||||
- cd tests && npm i
|
- cd tests && npm i
|
||||||
- node_modules/.bin/webpack --env.android
|
- node_modules/.bin/webpack --env.android
|
||||||
- node_modules/.bin/webpack --env.ios
|
- node_modules/.bin/webpack --env.ios
|
||||||
# modules transpilation
|
|
||||||
- cd ../tns-core-modules && npm i && cd ..
|
|
||||||
- npm install
|
|
||||||
- npm run tsc
|
|
||||||
- npm run tslint
|
|
||||||
|
@ -4,89 +4,115 @@ Development Workflow
|
|||||||
## Project Structure
|
## Project Structure
|
||||||
|
|
||||||
The repository contains several packages and apps:
|
The repository contains several packages and apps:
|
||||||
- `tns-core-modules` - The core NativeScript TypeScript modules used to develop NativeScript apps
|
- `nativescript-core` - The core NativeScript TypeScript modules used to develop NativeScript apps. Produces `@nativescript/core` npm package
|
||||||
- `tns-core-modules-widgets` - The native widgets (Java and Objective-C) used by the core NativeScript modules
|
- `tns-core-modules-package` - Base for generating the `tns-core-modules` package (compatibility package for projects that still import code from `tns-core-modules`).
|
||||||
- `e2e/ui-tests-app` - UI app used for manual testing and automation
|
- `tns-core-modules-widgets` - The native widgets (Java and Objective-C) used by the core NativeScript modules. Produces `tns-core-modules-widgets` npm package
|
||||||
|
- `tns-platform-declarations` - TypeScript definitions for Android and iOS native APIs. Produces `tns-platform-declarations` npm package
|
||||||
|
- `tests` - Unit tests app for the `@nativescript/core` package. These test are executed as nativescript application on mobile device or emulator.
|
||||||
|
- `unit-test` - Node unit tests. These test validate parts of the framework that do not require the nativescript runtime and so can be executed in node environment
|
||||||
- `e2e` - applications and *e2e* tests
|
- `e2e` - applications and *e2e* tests
|
||||||
- `tests` - Unit tests app for the `tns-core-modules`
|
- `e2e/ui-tests-app` - UI app used for manual testing and automation
|
||||||
- `tns-platform-declarations` - TypeScript definitions for Android and iOS native APIs
|
- `apps` - legacy apps for testing
|
||||||
|
- `build` - scripts used for building and infrastructure
|
||||||
|
- `dist` - construction site for packing npm modules
|
||||||
|
|
||||||
Working with the repo is organized with npm scripts,
|
Working with the repo is organized with npm scripts,
|
||||||
go and read through the `scripts` section in the [package.json](./package.json).
|
go and read through the `scripts` section in the [package.json](./package.json).
|
||||||
|
|
||||||
Managing dependencies:
|
Managing dependencies:
|
||||||
|
- `tns-core-modules-widgets` depends on:
|
||||||
|
- no deps
|
||||||
|
- `@nativescript/core` depends on:
|
||||||
|
- `tns-core-modules-widgets`
|
||||||
|
- (devDep)`tns-platform-declarations`
|
||||||
- `tns-core-modules` depends on:
|
- `tns-core-modules` depends on:
|
||||||
- `tns-platform-declarations`
|
- `@nativescript/core`
|
||||||
- `e2e/ui-tests-app` depends on:
|
- (devDep)`tns-platform-declarations`
|
||||||
- `tns-platform-declarations`
|
|
||||||
- `tns-core-modules`
|
|
||||||
- `e2e` depends on:
|
|
||||||
- `tns-core-modules`
|
|
||||||
- `tests` depends on:
|
|
||||||
- `tns-platform-declarations`
|
|
||||||
- `tns-core-modules`
|
|
||||||
|
|
||||||
> NOTE: `tns-core-modules` depends on `tns-core-modules-widgets`,
|
|
||||||
|
|
||||||
## Initial Setup
|
## Initial Setup
|
||||||
|
|
||||||
Clone (or fork/clone) the repo:
|
Clone (or fork/clone) the repo and run setup script:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
git clone https://github.com/NativeScript/NativeScript.git
|
git clone https://github.com/NativeScript/NativeScript.git
|
||||||
|
cd NativeScript
|
||||||
|
npm run setup
|
||||||
```
|
```
|
||||||
|
|
||||||
Install dependencies:
|
## Running Unit Tests Application
|
||||||
|
After the [initial setup](#initial-setup) you can run the tests with:
|
||||||
``` bash
|
|
||||||
npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
## Running Unit Tests
|
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
cd tests
|
cd tests
|
||||||
tns run android | ios
|
tns run android | ios
|
||||||
```
|
```
|
||||||
|
You can do changes in the test app and `nativescript-core` and rely on HMR to re-run tests.
|
||||||
|
|
||||||
## Running the UI Test App
|
## Running the `e2e` Test Apps
|
||||||
|
|
||||||
The UI test app is an ordinary NativeScript app that logs the test results on the go.
|
There are couple of application used for development and testing.
|
||||||
After the [initial setup](#initial-setup) you can run the tests with:
|
The `ui-test-app` is the more frequently used for development and validation. It is an ordinary NativeScript app that logs the test results on the go.
|
||||||
|
|
||||||
|
After the [initial setup](#initial-setup) run the e2e apps with:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
cd e2e/ui-tests-app
|
cd e2e/<app-name>
|
||||||
|
|
||||||
# Run the Android app
|
# Run the Android app
|
||||||
tns platform add android@next # NOTE: do not commit this change to package.json
|
tns platform add android@next
|
||||||
tns run android
|
tns run android
|
||||||
|
|
||||||
# Run the iOS app
|
# Run the iOS app
|
||||||
tns platform add ios@next # NOTE: do not commit this change to package.json
|
tns platform add ios@next
|
||||||
tns run ios
|
tns run ios
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
>Note: NOTE: do not commit changes in the runtime versions to `e2e/<app-name>/package.json`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Running Another App
|
## Running Another App
|
||||||
|
|
||||||
1. Open the app, where you will use the module from the repository in the console.
|
### TypeScript Applications
|
||||||
2. Add the `tns-core-modules` in the application via:
|
Link both the `nativescript-core` folders and the generated compatibility package (`dist\tns-core-modules`):
|
||||||
``` bash
|
``` bash
|
||||||
npm install --save <path to tns-core-modules>
|
npm i <path-to-nativescript-repo>/nativescript-core --save
|
||||||
# Example: npm install --save ../NativeScript/tns-core-modules
|
npm i <path-to-nativescript-repo>/dist/tns-core-modules --save
|
||||||
```
|
|
||||||
3. Run the app
|
|
||||||
```bash
|
|
||||||
tns run ios
|
|
||||||
tns run android
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
You can do changes in the app code and `nativescript-core` and rely on HMR to refresh the app.
|
||||||
**NOTE**
|
|
||||||
|
|
||||||
Linking `tns-core-modules` in Angular app does not work at the moment. Check [#7905](https://github.com/NativeScript/NativeScript/issues/7905) for more details on the issue.
|
### JavaScript Applications
|
||||||
|
Use the same steps as with TS application. However, the configuration of JS application does not include loading and transpiling TS code. You need to transpile the TS code in `nativescript-core` yourself. The following npm script will run tsc in watch mode in `nativescript-core` (run it in a separate terminal so that you can do `tns run` in parallel):
|
||||||
|
|
||||||
---
|
``` bash
|
||||||
|
npm run tsc-core-watch
|
||||||
|
```
|
||||||
|
|
||||||
|
### Angular Applications
|
||||||
|
Linking `tns-core-modules` and `@nativescript/core` in **Angular applications** does not work at the moment. Check [#7905](https://github.com/NativeScript/NativeScript/issues/7905) for more details on the issue.
|
||||||
|
|
||||||
|
|
||||||
|
## Building `tns-core-modules-widgets`
|
||||||
|
You can the following npm script to build and link the `tns-core-modules-widgets` package.
|
||||||
|
``` bash
|
||||||
|
npm run setup-widgets
|
||||||
|
```
|
||||||
|
|
||||||
|
This script will build the `tns-core-modules-widgets` package and link it inside the `nativescript-core` so it will be used for running the tests and e2e apps.
|
||||||
|
|
||||||
|
>Note: NOTE: do not commit changes in the `tns-core-modules-widgets` dependency in the `nativescript-core/package.json`
|
||||||
|
|
||||||
|
## Running Node Unit Tests
|
||||||
|
Run node unit tests with:
|
||||||
|
```
|
||||||
|
npm run unit-test
|
||||||
|
```
|
||||||
|
or run tests in watch mode:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm run unit-test-watch
|
||||||
|
```
|
||||||
|
|
||||||
## Platform declarations
|
## Platform declarations
|
||||||
To update the platform declarations (the ios.d.ts-es) you can run:
|
To update the platform declarations (the ios.d.ts-es) you can run:
|
||||||
|
368
api-extractor.json
Normal file
@ -0,0 +1,368 @@
|
|||||||
|
/**
|
||||||
|
* Config file for API Extractor. For more info, please visit: https://api-extractor.com
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Optionally specifies another JSON config file that this file extends from. This provides a way for
|
||||||
|
* standard settings to be shared across multiple projects.
|
||||||
|
*
|
||||||
|
* If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains
|
||||||
|
* the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be
|
||||||
|
* resolved using NodeJS require().
|
||||||
|
*
|
||||||
|
* SUPPORTED TOKENS: none
|
||||||
|
* DEFAULT VALUE: ""
|
||||||
|
*/
|
||||||
|
// "extends": "./shared/api-extractor-base.json"
|
||||||
|
// "extends": "my-package/include/api-extractor-base.json"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines the "<projectFolder>" token that can be used with other config file settings. The project folder
|
||||||
|
* typically contains the tsconfig.json and package.json config files, but the path is user-defined.
|
||||||
|
*
|
||||||
|
* The path is resolved relative to the folder of the config file that contains the setting.
|
||||||
|
*
|
||||||
|
* The default value for "projectFolder" is the token "<lookup>", which means the folder is determined by traversing
|
||||||
|
* parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder
|
||||||
|
* that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error
|
||||||
|
* will be reported.
|
||||||
|
*
|
||||||
|
* SUPPORTED TOKENS: <lookup>
|
||||||
|
* DEFAULT VALUE: "<lookup>"
|
||||||
|
*/
|
||||||
|
"projectFolder": "nativescript-core",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor
|
||||||
|
* analyzes the symbols exported by this module.
|
||||||
|
*
|
||||||
|
* The file extension must be ".d.ts" and not ".ts".
|
||||||
|
*
|
||||||
|
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
||||||
|
* prepend a folder token such as "<projectFolder>".
|
||||||
|
*
|
||||||
|
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
||||||
|
*/
|
||||||
|
"mainEntryPointFilePath": "<projectFolder>/index.d.ts",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines how the TypeScript compiler engine will be invoked by API Extractor.
|
||||||
|
*/
|
||||||
|
"compiler": {
|
||||||
|
/**
|
||||||
|
* Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project.
|
||||||
|
*
|
||||||
|
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
||||||
|
* prepend a folder token such as "<projectFolder>".
|
||||||
|
*
|
||||||
|
* Note: This setting will be ignored if "overrideTsconfig" is used.
|
||||||
|
*
|
||||||
|
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
||||||
|
* DEFAULT VALUE: "<projectFolder>/tsconfig.json"
|
||||||
|
*/
|
||||||
|
"tsconfigFilePath": "<projectFolder>/tsconfig.json",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk.
|
||||||
|
* The object must conform to the TypeScript tsconfig schema:
|
||||||
|
*
|
||||||
|
* http://json.schemastore.org/tsconfig
|
||||||
|
*
|
||||||
|
* If omitted, then the tsconfig.json file will be read from the "projectFolder".
|
||||||
|
*
|
||||||
|
* DEFAULT VALUE: no overrideTsconfig section
|
||||||
|
*/
|
||||||
|
// "overrideTsconfig": {
|
||||||
|
// . . .
|
||||||
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended
|
||||||
|
* and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when
|
||||||
|
* dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses
|
||||||
|
* for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck.
|
||||||
|
*
|
||||||
|
* DEFAULT VALUE: false
|
||||||
|
*/
|
||||||
|
// "skipLibCheck": true,
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configures how the API report file (*.api.md) will be generated.
|
||||||
|
*/
|
||||||
|
"apiReport": {
|
||||||
|
/**
|
||||||
|
* (REQUIRED) Whether to generate an API report.
|
||||||
|
*/
|
||||||
|
"enabled": true,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce
|
||||||
|
* a full file path.
|
||||||
|
*
|
||||||
|
* The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/".
|
||||||
|
*
|
||||||
|
* SUPPORTED TOKENS: <packageName>, <unscopedPackageName>
|
||||||
|
* DEFAULT VALUE: "<unscopedPackageName>.api.md"
|
||||||
|
*/
|
||||||
|
"reportFileName": "<unscopedPackageName>.api.md",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies the folder where the API report file is written. The file name portion is determined by
|
||||||
|
* the "reportFileName" setting.
|
||||||
|
*
|
||||||
|
* The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy,
|
||||||
|
* e.g. for an API review.
|
||||||
|
*
|
||||||
|
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
||||||
|
* prepend a folder token such as "<projectFolder>".
|
||||||
|
*
|
||||||
|
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
||||||
|
* DEFAULT VALUE: "<projectFolder>/etc/"
|
||||||
|
*/
|
||||||
|
"reportFolder": "api-reports/",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies the folder where the temporary report file is written. The file name portion is determined by
|
||||||
|
* the "reportFileName" setting.
|
||||||
|
*
|
||||||
|
* After the temporary file is written to disk, it is compared with the file in the "reportFolder".
|
||||||
|
* If they are different, a production build will fail.
|
||||||
|
*
|
||||||
|
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
||||||
|
* prepend a folder token such as "<projectFolder>".
|
||||||
|
*
|
||||||
|
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
||||||
|
* DEFAULT VALUE: "<projectFolder>/temp/"
|
||||||
|
*/
|
||||||
|
// "reportTempFolder": "<projectFolder>/temp/"
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configures how the doc model file (*.api.json) will be generated.
|
||||||
|
*/
|
||||||
|
"docModel": {
|
||||||
|
/**
|
||||||
|
* (REQUIRED) Whether to generate a doc model file.
|
||||||
|
*/
|
||||||
|
"enabled": true,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The output path for the doc model file. The file extension should be ".api.json".
|
||||||
|
*
|
||||||
|
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
||||||
|
* prepend a folder token such as "<projectFolder>".
|
||||||
|
*
|
||||||
|
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
||||||
|
* DEFAULT VALUE: "<projectFolder>/temp/<unscopedPackageName>.api.json"
|
||||||
|
*/
|
||||||
|
// "apiJsonFilePath": "<projectFolder>/temp/<unscopedPackageName>.api.json"
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configures how the .d.ts rollup file will be generated.
|
||||||
|
*/
|
||||||
|
"dtsRollup": {
|
||||||
|
/**
|
||||||
|
* (REQUIRED) Whether to generate the .d.ts rollup file.
|
||||||
|
*/
|
||||||
|
"enabled": true,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies the output path for a .d.ts rollup file to be generated without any trimming.
|
||||||
|
* This file will include all declarations that are exported by the main entry point.
|
||||||
|
*
|
||||||
|
* If the path is an empty string, then this file will not be written.
|
||||||
|
*
|
||||||
|
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
||||||
|
* prepend a folder token such as "<projectFolder>".
|
||||||
|
*
|
||||||
|
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
||||||
|
* DEFAULT VALUE: "<projectFolder>/dist/<unscopedPackageName>.d.ts"
|
||||||
|
*/
|
||||||
|
"untrimmedFilePath": "<projectFolder>/nativescript-core.d.ts",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release.
|
||||||
|
* This file will include only declarations that are marked as "@public" or "@beta".
|
||||||
|
*
|
||||||
|
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
||||||
|
* prepend a folder token such as "<projectFolder>".
|
||||||
|
*
|
||||||
|
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
||||||
|
* DEFAULT VALUE: ""
|
||||||
|
*/
|
||||||
|
// "betaTrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>-beta.d.ts",
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release.
|
||||||
|
* This file will include only declarations that are marked as "@public".
|
||||||
|
*
|
||||||
|
* If the path is an empty string, then this file will not be written.
|
||||||
|
*
|
||||||
|
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
||||||
|
* prepend a folder token such as "<projectFolder>".
|
||||||
|
*
|
||||||
|
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
||||||
|
* DEFAULT VALUE: ""
|
||||||
|
*/
|
||||||
|
// "publicTrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>-public.d.ts",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When a declaration is trimmed, by default it will be replaced by a code comment such as
|
||||||
|
* "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the
|
||||||
|
* declaration completely.
|
||||||
|
*
|
||||||
|
* DEFAULT VALUE: false
|
||||||
|
*/
|
||||||
|
// "omitTrimmingComments": true
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configures how the tsdoc-metadata.json file will be generated.
|
||||||
|
*/
|
||||||
|
"tsdocMetadata": {
|
||||||
|
/**
|
||||||
|
* Whether to generate the tsdoc-metadata.json file.
|
||||||
|
*
|
||||||
|
* DEFAULT VALUE: true
|
||||||
|
*/
|
||||||
|
// "enabled": true,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies where the TSDoc metadata file should be written.
|
||||||
|
*
|
||||||
|
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
||||||
|
* prepend a folder token such as "<projectFolder>".
|
||||||
|
*
|
||||||
|
* The default value is "<lookup>", which causes the path to be automatically inferred from the "tsdocMetadata",
|
||||||
|
* "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup
|
||||||
|
* falls back to "tsdoc-metadata.json" in the package folder.
|
||||||
|
*
|
||||||
|
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
||||||
|
* DEFAULT VALUE: "<lookup>"
|
||||||
|
*/
|
||||||
|
// "tsdocMetadataFilePath": "<projectFolder>/dist/tsdoc-metadata.json"
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configures how API Extractor reports error and warning messages produced during analysis.
|
||||||
|
*
|
||||||
|
* There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages.
|
||||||
|
*/
|
||||||
|
"messages": {
|
||||||
|
/**
|
||||||
|
* Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing
|
||||||
|
* the input .d.ts files.
|
||||||
|
*
|
||||||
|
* TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551"
|
||||||
|
*
|
||||||
|
* DEFAULT VALUE: A single "default" entry with logLevel=warning.
|
||||||
|
*/
|
||||||
|
"compilerMessageReporting": {
|
||||||
|
/**
|
||||||
|
* Configures the default routing for messages that don't match an explicit rule in this table.
|
||||||
|
*/
|
||||||
|
"default": {
|
||||||
|
/**
|
||||||
|
* Specifies whether the message should be written to the the tool's output log. Note that
|
||||||
|
* the "addToApiReportFile" property may supersede this option.
|
||||||
|
*
|
||||||
|
* Possible values: "error", "warning", "none"
|
||||||
|
*
|
||||||
|
* Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail
|
||||||
|
* and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes
|
||||||
|
* the "--local" option), the warning is displayed but the build will not fail.
|
||||||
|
*
|
||||||
|
* DEFAULT VALUE: "warning"
|
||||||
|
*/
|
||||||
|
"logLevel": "error", //"warning",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md),
|
||||||
|
* then the message will be written inside that file; otherwise, the message is instead logged according to
|
||||||
|
* the "logLevel" option.
|
||||||
|
*
|
||||||
|
* DEFAULT VALUE: false
|
||||||
|
*/
|
||||||
|
// "addToApiReportFile": false
|
||||||
|
},
|
||||||
|
|
||||||
|
// "TS2551": {
|
||||||
|
// "logLevel": "warning",
|
||||||
|
// "addToApiReportFile": true
|
||||||
|
// },
|
||||||
|
//
|
||||||
|
// . . .
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configures handling of messages reported by API Extractor during its analysis.
|
||||||
|
*
|
||||||
|
* API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag"
|
||||||
|
*
|
||||||
|
* DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings
|
||||||
|
*/
|
||||||
|
"extractorMessageReporting": {
|
||||||
|
"default": {
|
||||||
|
"logLevel": "warning",
|
||||||
|
// "addToApiReportFile": false
|
||||||
|
},
|
||||||
|
"ae-missing-release-tag": {
|
||||||
|
"logLevel": "none",
|
||||||
|
"addToApiReportFile": false
|
||||||
|
},
|
||||||
|
// "ae-extra-release-tag": {
|
||||||
|
// "logLevel": "warning",
|
||||||
|
// "addToApiReportFile": true
|
||||||
|
// },
|
||||||
|
//
|
||||||
|
// . . .
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configures handling of messages reported by the TSDoc parser when analyzing code comments.
|
||||||
|
*
|
||||||
|
* TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text"
|
||||||
|
*
|
||||||
|
* DEFAULT VALUE: A single "default" entry with logLevel=warning.
|
||||||
|
*/
|
||||||
|
"tsdocMessageReporting": {
|
||||||
|
"default": {
|
||||||
|
"logLevel": "warning",
|
||||||
|
// "addToApiReportFile": false
|
||||||
|
},
|
||||||
|
"tsdoc-param-tag-missing-hyphen": {
|
||||||
|
"logLevel": "none",
|
||||||
|
"addToApiReportFile": false
|
||||||
|
},
|
||||||
|
"tsdoc-undefined-tag": {
|
||||||
|
"logLevel": "none",
|
||||||
|
"addToApiReportFile": false
|
||||||
|
},
|
||||||
|
"tsdoc-unsupported-tag": {
|
||||||
|
"logLevel": "none",
|
||||||
|
"addToApiReportFile": false
|
||||||
|
},
|
||||||
|
"tsdoc-escape-greater-than": {
|
||||||
|
"logLevel": "none",
|
||||||
|
"addToApiReportFile": false
|
||||||
|
},
|
||||||
|
"tsdoc-malformed-html-name": {
|
||||||
|
"logLevel": "none",
|
||||||
|
"addToApiReportFile": false
|
||||||
|
},
|
||||||
|
|
||||||
|
// "tsdoc-link-tag-unescaped-text": {
|
||||||
|
// "logLevel": "warning",
|
||||||
|
// "addToApiReportFile": true
|
||||||
|
// },
|
||||||
|
//
|
||||||
|
// . . .
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
3067
api-reports/NativeScript.api.md
Normal file
20
build/build-compat.sh
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
##
|
||||||
|
# Prepares and packs:
|
||||||
|
# - tns-core-modules
|
||||||
|
# inside dist folder
|
||||||
|
##
|
||||||
|
|
||||||
|
set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
DIST=dist;
|
||||||
|
ROOT_DIR=$(cd `dirname $0` && pwd)/..;
|
||||||
|
cd "$ROOT_DIR"
|
||||||
|
|
||||||
|
## Prepare tns-core-modules
|
||||||
|
|
||||||
|
./build/prepare-compat.sh
|
||||||
|
|
||||||
|
./build/pack-compat.sh
|
18
build/build-core.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
##
|
||||||
|
# Prepares and packs:
|
||||||
|
# - tns-platform-declarations
|
||||||
|
# - @nativescript/core packages
|
||||||
|
# inside dist folder
|
||||||
|
##
|
||||||
|
|
||||||
|
set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
DIST=dist;
|
||||||
|
ROOT_DIR=$(cd `dirname $0` && pwd)/..;
|
||||||
|
cd "$ROOT_DIR"
|
||||||
|
|
||||||
|
./build/prepare-core.sh
|
||||||
|
./build/pack-core.sh
|
@ -1,12 +1,12 @@
|
|||||||
const path = require("path");
|
import * as path from "path";
|
||||||
const fs = require("fs");
|
import * as fs from "fs";
|
||||||
const readdirp = require("readdirp");
|
import readdirp, { EntryInfo } from "readdirp";
|
||||||
|
|
||||||
const inputFolder = path.resolve(process.argv[2]);
|
const inputFolder = path.resolve(process.argv[2]);
|
||||||
|
|
||||||
console.log(`Clearing private definitions in ${inputFolder}`);
|
console.log(`Clearing private definitions in ${inputFolder}`);
|
||||||
|
|
||||||
function filterTypeScriptFiles(content) {
|
function filterTypeScriptFiles(content: string) {
|
||||||
var leadingPrivate = /^.*@private/ig;
|
var leadingPrivate = /^.*@private/ig;
|
||||||
if (leadingPrivate.test(content)) {
|
if (leadingPrivate.test(content)) {
|
||||||
return { shouldDelete: true };
|
return { shouldDelete: true };
|
||||||
@ -25,27 +25,32 @@ function filterTypeScriptFiles(content) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return { shouldReplace: false, shouldDelete: false };
|
return { shouldReplace: false, shouldDelete: false };
|
||||||
};
|
}
|
||||||
|
|
||||||
readdirp(inputFolder, {
|
readdirp(inputFolder, {
|
||||||
fileFilter: ["*.d.ts"],
|
fileFilter: ["*.d.ts"],
|
||||||
directoryFilter: function (di) { return !di.path.includes("node_modules"); }
|
directoryFilter: function (di) { return !di.path.includes("node_modules"); }
|
||||||
}).on("data", (entry) => {
|
}).on("data", (entry: EntryInfo) => {
|
||||||
const { fullPath } = entry;
|
const { fullPath } = entry;
|
||||||
const content = fs.readFileSync(fullPath, "utf8");
|
const content = fs.readFileSync(fullPath, "utf8");
|
||||||
const { shouldDelete, shouldReplace, newContent } = filterTypeScriptFiles(content);
|
const { shouldDelete, shouldReplace, newContent } = filterTypeScriptFiles(content);
|
||||||
|
|
||||||
if (shouldDelete) {
|
if (shouldDelete) {
|
||||||
console.log("[Delete]", fullPath)
|
console.log("[Delete]", fullPath);
|
||||||
fs.unlinkSync(fullPath);
|
fs.unlinkSync(fullPath);
|
||||||
} else if (shouldReplace) {
|
} else if (shouldReplace) {
|
||||||
console.log("[Cleared]", fullPath)
|
console.log("[Cleared]", fullPath);
|
||||||
fs.writeFileSync(fullPath, newContent, "utf8", (err) => {
|
try {
|
||||||
|
fs.writeFileSync(fullPath, newContent, "utf8");
|
||||||
|
} catch (error) {
|
||||||
console.log("ERROR writing file: " + fullPath, error);
|
console.log("ERROR writing file: " + fullPath, error);
|
||||||
})
|
process.exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.on("warn", error => console.error("non-fatal error", error))
|
.on("warn", (error: Error) => console.error("non-fatal error", error))
|
||||||
.on("error", error => console.error("fatal error", error))
|
.on("error", (error: Error) => {
|
||||||
|
console.error("fatal error", error);
|
||||||
|
process.exit(1);
|
||||||
|
})
|
||||||
.on("end", () => console.log("done"));
|
.on("end", () => console.log("done"));
|
||||||
|
|
23
build/generate-barrel-dts.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
##
|
||||||
|
# Prepares and packs:
|
||||||
|
# - tns-core-modules
|
||||||
|
# inside dist folder
|
||||||
|
##
|
||||||
|
|
||||||
|
set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
DIST=dist;
|
||||||
|
ROOT_DIR=$(cd `dirname $0` && pwd)/..;
|
||||||
|
cd "$ROOT_DIR"
|
||||||
|
|
||||||
|
npx tsc -p nativescript-core/tsconfig.barrels.json
|
||||||
|
|
||||||
|
FROM="temp/dts-out"
|
||||||
|
TO="nativescript-core"
|
||||||
|
|
||||||
|
mv $FROM/index.d.ts $TO/index.d.ts
|
||||||
|
mv $FROM/ui/index.d.ts $TO/ui/index.d.ts
|
||||||
|
mv $FROM/ui/layouts/index.d.ts $TO/ui/layouts/index.d.ts
|
171
build/generate-tns-compat.ts
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
import * as path from "path";
|
||||||
|
import * as fs from "fs";
|
||||||
|
import readdirp, { EntryInfo } from "readdirp";
|
||||||
|
|
||||||
|
const inputFolder = path.resolve("dist/nativescript-core");
|
||||||
|
const outputFolder = path.resolve("dist/tns-core-modules");
|
||||||
|
const testImports: string[] = [];
|
||||||
|
|
||||||
|
// List of definition files that don't need to be exported.
|
||||||
|
const dtsBlacklist = [
|
||||||
|
"module.d.ts",
|
||||||
|
"nativescript-error.d.ts",
|
||||||
|
"references.d.ts",
|
||||||
|
"tns-core-modules.d.ts"
|
||||||
|
];
|
||||||
|
|
||||||
|
// List of modules that should be re-exported despite they are private
|
||||||
|
const privateModulesWhitelist = [
|
||||||
|
"ui/styling/style-scope" //Reason: nativescript-dev-webpack generates code that imports this module
|
||||||
|
]
|
||||||
|
|
||||||
|
// There are few module using the "export default" syntax
|
||||||
|
// They should be handled differently when re-exporting
|
||||||
|
const modulesWithDefaultExports = [
|
||||||
|
"utils/lazy"
|
||||||
|
];
|
||||||
|
|
||||||
|
function traverseInputDir(fileFilter: string[], callback: (entry: EntryInfo) => void) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
readdirp(inputFolder, {
|
||||||
|
fileFilter,
|
||||||
|
directoryFilter: (di: EntryInfo) => {
|
||||||
|
return !di.path.startsWith("node_modules") &&
|
||||||
|
!di.path.startsWith("platforms");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.on("data", callback)
|
||||||
|
.on("error", reject)
|
||||||
|
.on("end", resolve);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function processPackageJsonFile(entry: EntryInfo) {
|
||||||
|
const dirPath = path.dirname(entry.path);
|
||||||
|
const outputFilePath = path.join(outputFolder, entry.path);
|
||||||
|
|
||||||
|
ensureDirectoryExistence(outputFilePath);
|
||||||
|
|
||||||
|
const json = require(entry.fullPath);
|
||||||
|
if (json.main) {
|
||||||
|
(<any>fs).copyFileSync(entry.fullPath, outputFilePath);
|
||||||
|
logFileCreated(outputFilePath);
|
||||||
|
addTestImport(dirPath);
|
||||||
|
|
||||||
|
const mainFile = path.join(dirPath, json.main);
|
||||||
|
createReExportFile(mainFile, ".ts");
|
||||||
|
addTestImport(mainFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function processDefinitionFile(entry: EntryInfo) {
|
||||||
|
if (dtsBlacklist.includes(entry.path)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const relativeFilePathNoExt = entry.path.replace(/\.d\.ts$/, "");
|
||||||
|
|
||||||
|
// Re-export everything from d.ts file
|
||||||
|
createReExportFile(relativeFilePathNoExt, ".d.ts");
|
||||||
|
|
||||||
|
// This might be only a definitions file.
|
||||||
|
// So check if there is ts/js files before creating TS file with re-exports
|
||||||
|
const baseFile = path.join(inputFolder, relativeFilePathNoExt);
|
||||||
|
if (fs.existsSync(baseFile + ".ts") ||
|
||||||
|
fs.existsSync(baseFile + ".js") ||
|
||||||
|
(fs.existsSync(baseFile + ".android.ts") && fs.existsSync(baseFile + ".ios.ts")) ||
|
||||||
|
(fs.existsSync(baseFile + ".android.js") && fs.existsSync(baseFile + ".ios.js"))) {
|
||||||
|
|
||||||
|
createReExportFile(relativeFilePathNoExt, ".ts");
|
||||||
|
addTestImport(relativeFilePathNoExt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function createReExportFile(pathNoExt: string, ext: ".ts" | ".d.ts") {
|
||||||
|
const outputFile = path.join(outputFolder, pathNoExt + ext);
|
||||||
|
if (!fs.existsSync(outputFile)) {
|
||||||
|
ensureDirectoryExistence(outputFile);
|
||||||
|
let content = `export * from "@nativescript/core/${pathNoExt}";`
|
||||||
|
if (modulesWithDefaultExports.includes(pathNoExt)) {
|
||||||
|
content = `import defExport from "@nativescript/core/${pathNoExt}";\n`;
|
||||||
|
content += `export default defExport;`
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.writeFileSync(outputFile, content);
|
||||||
|
logFileCreated(outputFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ensureDirectoryExistence(filePath: string) {
|
||||||
|
const dirname = path.dirname(filePath);
|
||||||
|
if (fs.existsSync(dirname)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
ensureDirectoryExistence(dirname);
|
||||||
|
fs.mkdirSync(dirname);
|
||||||
|
}
|
||||||
|
|
||||||
|
function logFileCreated(file: string) {
|
||||||
|
console.log(`CREATED: ${file}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function addTestImport(moduleName: string) {
|
||||||
|
testImports.push(moduleName);
|
||||||
|
}
|
||||||
|
|
||||||
|
function generateTestFile() {
|
||||||
|
const uniqueImports = Array.from(new Set(testImports)).sort();
|
||||||
|
|
||||||
|
const output: string[] = [];
|
||||||
|
|
||||||
|
output.push(`/* tslint:disable */`);
|
||||||
|
output.push(`import { compare, report } from "./module-compare";\n\n`);
|
||||||
|
|
||||||
|
uniqueImports.forEach((name) => {
|
||||||
|
const moduleName = name.replace(/[\.\/\-]/g, "_");
|
||||||
|
const compatName = `module_${moduleName}_compat`;
|
||||||
|
const coreName = `module_${moduleName}_core`;
|
||||||
|
output.push(`import * as ${coreName} from "@nativescript/core/${name}";`);
|
||||||
|
output.push(`import * as ${compatName} from "tns-core-modules/${name}";`);
|
||||||
|
output.push(`compare("${name}", ${coreName}, ${compatName});\n`);
|
||||||
|
});
|
||||||
|
|
||||||
|
output.push(`\n`);
|
||||||
|
output.push(`report();`);
|
||||||
|
|
||||||
|
const testFilePath = path.resolve("dist/generated-tests/tests.ts");
|
||||||
|
ensureDirectoryExistence(testFilePath);
|
||||||
|
|
||||||
|
fs.writeFileSync(testFilePath, output.join("\n"), "utf8");
|
||||||
|
(<any>fs).copyFileSync(path.resolve("build/generated-compat-checks/module-compare.ts"), path.resolve("dist/generated-tests/module-compare.ts"));
|
||||||
|
|
||||||
|
console.log(`Compat tests generated: ${testFilePath}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function generateExportsForPrivateModules() {
|
||||||
|
privateModulesWhitelist.forEach(pathNoExt => {
|
||||||
|
createReExportFile(pathNoExt, ".ts");
|
||||||
|
addTestImport(pathNoExt);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
console.log(" ------> GENERATING FILES FORM PACKAGE.JSON");
|
||||||
|
// Traverse all package.json files and create:
|
||||||
|
// * .ts file with re-exports for the package.json/main
|
||||||
|
// * .d.ts file with re-exports for the package.json/types
|
||||||
|
await traverseInputDir(["package.json"], processPackageJsonFile);
|
||||||
|
|
||||||
|
console.log(" ------> GENERATING FILES FORM DEFINITIONS");
|
||||||
|
// Traverse all d.ts files and create
|
||||||
|
// * .d.ts file with re-exports for definitions for the .d.ts
|
||||||
|
// * .ts file with re-exports for the corresponding ts/js file (is such exists)
|
||||||
|
await traverseInputDir(["*.d.ts"], processDefinitionFile);
|
||||||
|
|
||||||
|
generateExportsForPrivateModules();
|
||||||
|
|
||||||
|
// Generate tests in
|
||||||
|
generateTestFile()
|
||||||
|
})().catch(e => {
|
||||||
|
console.log("Error generating tns-core-modules files: " + e);
|
||||||
|
});
|
21
build/generated-compat-checks/module-compare.ts
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
const results = { errors: new Array<string>(), modules: 0, exports: 0 };
|
||||||
|
|
||||||
|
export function compare(name: string, core: any, compat: any) {
|
||||||
|
results.modules++;
|
||||||
|
for (const key in core) {
|
||||||
|
results.exports++;
|
||||||
|
if (core[key] !== compat[key]) {
|
||||||
|
results.errors.push(`ERROR: Diff in module: ${name} key: ${key}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function report() {
|
||||||
|
console.log(`CHECKED COMPLETED. CHECKED MODULES: ${results.modules} EXPORTS: ${results.exports}`);
|
||||||
|
if (results.errors.length) {
|
||||||
|
console.log(`----- ${results.errors.length} CHECKS FAILED ----- `);
|
||||||
|
results.errors.forEach((err) => console.log(err));
|
||||||
|
} else {
|
||||||
|
console.log("----- ALL CHECKS SUCCESSFUL ----- ");
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +0,0 @@
|
|||||||
const { createPR, gitBranch } = require("./pr-helper");
|
|
||||||
|
|
||||||
const postQuery = {
|
|
||||||
"head": gitBranch,
|
|
||||||
"base": "master",
|
|
||||||
"title": "chore: merge release in master"
|
|
||||||
}
|
|
||||||
|
|
||||||
createPR(postQuery);
|
|
22
build/pack-compat.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
##
|
||||||
|
# Packs:
|
||||||
|
# - tns-core-modules
|
||||||
|
# inside dist folder
|
||||||
|
##
|
||||||
|
|
||||||
|
set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
## Pack tns-core-modules
|
||||||
|
(
|
||||||
|
cd "dist/tns-core-modules"
|
||||||
|
|
||||||
|
echo 'Run tsc ...'
|
||||||
|
npx tsc
|
||||||
|
|
||||||
|
echo 'NPM packing ...'
|
||||||
|
TGZ="$(npm pack)"
|
||||||
|
mv "$TGZ" "../$TGZ"
|
||||||
|
)
|
@ -1,4 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
##
|
||||||
|
# Prepares the tns-platform-declarations and @nativescript/core packages inside dist folder
|
||||||
|
##
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@ -13,7 +18,7 @@ cd "$ROOT_DIR"
|
|||||||
)
|
)
|
||||||
|
|
||||||
(
|
(
|
||||||
cd "$DIST/tns-core-modules"
|
cd "$DIST/nativescript-core"
|
||||||
TGZ="$(npm pack)"
|
TGZ="$(npm pack)"
|
||||||
mv "$TGZ" "../$TGZ"
|
mv "$TGZ" "../$TGZ"
|
||||||
)
|
)
|
@ -1,39 +0,0 @@
|
|||||||
const { execSync } = require('child_process');
|
|
||||||
const { writeFileSync, unlinkSync } = require("fs");
|
|
||||||
const { resolve } = require("path");
|
|
||||||
|
|
||||||
exports.gitBranch = execSync("git branch").toString()
|
|
||||||
.split("\n")
|
|
||||||
.filter(f => f.trim().startsWith("*"))[0]
|
|
||||||
.replace("*", "").trim();
|
|
||||||
|
|
||||||
exports.createPR = (postQuery) => {
|
|
||||||
if (!process.env.GIT_TOKEN) {
|
|
||||||
console.error("Missing env variable GIT_TOKEN");
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
const releaseDataJsonPath = resolve(process.cwd(), "git-helper.json");
|
|
||||||
writeFileSync(releaseDataJsonPath, JSON.stringify(postQuery));
|
|
||||||
const result = execSync(` curl -d "@${releaseDataJsonPath}" -X POST https://api.github.com/repos/NativeScript/NativeScript/pulls -H "Authorization: token ${process.env.GIT_TOKEN}" `);
|
|
||||||
console.log(result.toString());
|
|
||||||
unlinkSync(releaseDataJsonPath);
|
|
||||||
|
|
||||||
const requesResultJson = JSON.parse(result);
|
|
||||||
execSync(`open ${requesResultJson.html_url}`);
|
|
||||||
|
|
||||||
return requesResultJson;
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.argsParser = () => {
|
|
||||||
args = {};
|
|
||||||
process.argv
|
|
||||||
.filter(a => a.startsWith("--"))
|
|
||||||
.map(el => {
|
|
||||||
el = el.split("=");
|
|
||||||
const prop = el[0].replace("--", "").replace("-", "").trim();
|
|
||||||
const value = el[1].trim();
|
|
||||||
args[prop] = value;
|
|
||||||
});
|
|
||||||
|
|
||||||
return args;
|
|
||||||
}
|
|
47
build/prepare-compat.sh
Executable file
@ -0,0 +1,47 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
##
|
||||||
|
# Prepares and packs:
|
||||||
|
# - tns-core-modules
|
||||||
|
# inside dist folder
|
||||||
|
##
|
||||||
|
|
||||||
|
set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
DIST=dist;
|
||||||
|
ROOT_DIR=$(cd `dirname $0` && pwd)/..;
|
||||||
|
cd "$ROOT_DIR"
|
||||||
|
|
||||||
|
DEFAULT_NATIVESCRIPT_CORE_ARGS="../nativescript-core*.tgz --no-save"
|
||||||
|
NATIVESCRIPT_CORE_ARGS=${NATIVESCRIPT_CORE_ARGS:-$DEFAULT_NATIVESCRIPT_CORE_ARGS}
|
||||||
|
|
||||||
|
## Prepare tns-core-modules
|
||||||
|
(
|
||||||
|
PACKAGE_SOURCE=tns-core-modules-package;
|
||||||
|
PACKAGE=tns-core-modules;
|
||||||
|
|
||||||
|
echo "Clearing $DIST/$PACKAGE"
|
||||||
|
npx rimraf "$DIST/$PACKAGE"
|
||||||
|
npx rimraf "$DIST/$PACKAGE*.tgz"
|
||||||
|
|
||||||
|
echo "Generating compat package"
|
||||||
|
npx ts-node --project ./build/tsconfig.json ./build/generate-tns-compat
|
||||||
|
|
||||||
|
echo "Copying $PACKAGE_SOURCE $DIST/$PACKAGE..."
|
||||||
|
npx ncp "$PACKAGE_SOURCE" "$DIST/$PACKAGE"
|
||||||
|
|
||||||
|
echo "TODO(REMOVE THIS HACK): Copying platfroms/ios/Podfile"
|
||||||
|
mkdir -p "$DIST/$PACKAGE/platforms/ios"
|
||||||
|
npx ncp "nativescript-core/platforms/ios/Podfile" "$DIST/$PACKAGE/platforms/ios/Podfile"
|
||||||
|
|
||||||
|
echo "Copying README and LICENSE to $DIST/$PACKAGE"
|
||||||
|
npx ncp LICENSE "$DIST"/"$PACKAGE"/LICENSE
|
||||||
|
|
||||||
|
(
|
||||||
|
echo 'TypeScript transpile...'
|
||||||
|
cd "$DIST/$PACKAGE"
|
||||||
|
|
||||||
|
npm install ${NATIVESCRIPT_CORE_ARGS}
|
||||||
|
)
|
||||||
|
)
|
@ -1,4 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
##
|
||||||
|
# Prepares the tns-platform-declarations and @nativescript/core packages inside dist folder
|
||||||
|
##
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@ -40,12 +45,14 @@ mkdir -p "$DIST"
|
|||||||
|
|
||||||
## Prepare Core Modules
|
## Prepare Core Modules
|
||||||
(
|
(
|
||||||
PACKAGE=tns-core-modules;
|
PACKAGE=nativescript-core;
|
||||||
|
|
||||||
echo "Clearing $DIST/$PACKAGE"
|
echo "Clearing $DIST/$PACKAGE"
|
||||||
npx rimraf "$DIST/$PACKAGE"
|
npx rimraf "$DIST/$PACKAGE"
|
||||||
npx rimraf "$DIST/$PACKAGE*.tgz"
|
npx rimraf "$DIST/$PACKAGE*.tgz"
|
||||||
|
|
||||||
|
npm run api-extractor
|
||||||
|
|
||||||
echo "Copying $PACKAGE $DIST/$PACKAGE..."
|
echo "Copying $PACKAGE $DIST/$PACKAGE..."
|
||||||
npx ncp "$PACKAGE" "$DIST/$PACKAGE"
|
npx ncp "$PACKAGE" "$DIST/$PACKAGE"
|
||||||
|
|
||||||
@ -65,5 +72,5 @@ mkdir -p "$DIST"
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo "Clearing typescript definitions from private APIs..."
|
echo "Clearing typescript definitions from private APIs..."
|
||||||
node build/clear-private-definitions "$DIST/$PACKAGE"
|
npx ts-node --project ./build/tsconfig.json build/clear-private-definitions "$DIST/$PACKAGE"
|
||||||
)
|
)
|
11
build/tsconfig.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* tsconfig file used for executing TS script in the build folder with ts-node
|
||||||
|
**/
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
||||||
|
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
||||||
|
"strict": true, /* Enable all strict type-checking options. */
|
||||||
|
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
||||||
|
}
|
||||||
|
}
|
@ -14,7 +14,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nativescript-theme-core": "~1.0.6",
|
"nativescript-theme-core": "~1.0.6",
|
||||||
"tns-core-modules": "file:../../tns-core-modules"
|
"@nativescript/core": "file:../../nativescript-core",
|
||||||
|
"tns-core-modules": "file:../../dist/tns-core-modules"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/chai": "~4.1.7",
|
"@types/chai": "~4.1.7",
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
"license": "SEE LICENSE IN <your-license-filename>",
|
"license": "SEE LICENSE IN <your-license-filename>",
|
||||||
"repository": "<fill-your-repository-here>",
|
"repository": "<fill-your-repository-here>",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tns-core-modules": "file:../../tns-core-modules"
|
"@nativescript/core": "file:../../nativescript-core",
|
||||||
|
"tns-core-modules": "file:../../dist/tns-core-modules"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"nativescript-dev-webpack": "next",
|
"nativescript-dev-webpack": "next",
|
||||||
|
@ -14,7 +14,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nativescript-theme-core": "^1.0.6",
|
"nativescript-theme-core": "^1.0.6",
|
||||||
"tns-core-modules": "file:../../tns-core-modules"
|
"@nativescript/core": "file:../../nativescript-core",
|
||||||
|
"tns-core-modules": "file:../../dist/tns-core-modules"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"nativescript-dev-webpack": "next",
|
"nativescript-dev-webpack": "next",
|
||||||
|
@ -14,7 +14,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nativescript-theme-core": "~1.0.6",
|
"nativescript-theme-core": "~1.0.6",
|
||||||
"tns-core-modules": "file:../../tns-core-modules"
|
"@nativescript/core": "file:../../nativescript-core",
|
||||||
|
"tns-core-modules": "file:../../dist/tns-core-modules"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/chai": "~4.1.7",
|
"@types/chai": "~4.1.7",
|
||||||
|
@ -14,7 +14,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nativescript-theme-core": "~1.0.4",
|
"nativescript-theme-core": "~1.0.4",
|
||||||
"tns-core-modules": "file:../../tns-core-modules"
|
"@nativescript/core": "file:../../nativescript-core",
|
||||||
|
"tns-core-modules": "file:../../dist/tns-core-modules"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/chai": "~4.1.7",
|
"@types/chai": "~4.1.7",
|
||||||
|
15
e2e/scoped-packages/.editorconfig
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
charset = utf-8
|
||||||
|
|
||||||
|
[*.json]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.ts]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
33
e2e/scoped-packages/.gitignore
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# NativeScript
|
||||||
|
hooks/
|
||||||
|
node_modules/
|
||||||
|
platforms/
|
||||||
|
|
||||||
|
# NativeScript Template
|
||||||
|
*.js.map
|
||||||
|
*.js
|
||||||
|
!webpack.config.js
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# General
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
.idea
|
||||||
|
.cloud
|
||||||
|
.project
|
||||||
|
tmp/
|
||||||
|
typings/
|
||||||
|
|
||||||
|
# Visual Studio Code
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
201
e2e/scoped-packages/LICENSE
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright (c) 2015-2019 Progress Software Corporation
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
20
e2e/scoped-packages/app/App_Resources/Android/app.gradle
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// Add your native dependencies here:
|
||||||
|
|
||||||
|
// Uncomment to add recyclerview-v7 dependency
|
||||||
|
//dependencies {
|
||||||
|
// implementation 'com.android.support:recyclerview-v7:+'
|
||||||
|
//}
|
||||||
|
|
||||||
|
// If you want to add something to be applied before applying plugins' include.gradle files
|
||||||
|
// e.g. project.ext.googlePlayServicesVersion = "15.0.1"
|
||||||
|
// create a file named before-plugins.gradle in the current directory and place it there
|
||||||
|
|
||||||
|
android {
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion 17
|
||||||
|
generatedDensities = []
|
||||||
|
}
|
||||||
|
aaptOptions {
|
||||||
|
additionalParameters "--no-version-vectors"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="__PACKAGE__"
|
||||||
|
android:versionCode="1"
|
||||||
|
android:versionName="1.0">
|
||||||
|
|
||||||
|
<supports-screens
|
||||||
|
android:smallScreens="true"
|
||||||
|
android:normalScreens="true"
|
||||||
|
android:largeScreens="true"
|
||||||
|
android:xlargeScreens="true"/>
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||||
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:name="com.tns.NativeScriptApplication"
|
||||||
|
android:allowBackup="true"
|
||||||
|
android:icon="@drawable/icon"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:theme="@style/AppTheme">
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name="com.tns.NativeScriptActivity"
|
||||||
|
android:label="@string/title_activity_kimera"
|
||||||
|
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode"
|
||||||
|
android:theme="@style/LaunchScreenTheme">
|
||||||
|
|
||||||
|
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />
|
||||||
|
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<activity android:name="com.tns.ErrorReportActivity"/>
|
||||||
|
</application>
|
||||||
|
</manifest>
|
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 16 KiB |
@ -0,0 +1,8 @@
|
|||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="fill">
|
||||||
|
<item>
|
||||||
|
<bitmap android:gravity="fill" android:src="@drawable/background" />
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<bitmap android:gravity="center" android:src="@drawable/logo" />
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 193 KiB |
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="ns_accent">#3d5afe</color>
|
||||||
|
</resources>
|
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<!-- Application theme -->
|
||||||
|
<style name="AppTheme" parent="AppThemeBase">
|
||||||
|
<item name="android:datePickerStyle">@style/SpinnerDatePicker</item>
|
||||||
|
<item name="android:timePickerStyle">@style/SpinnerTimePicker</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- Default style for DatePicker - in spinner mode -->
|
||||||
|
<style name="SpinnerDatePicker" parent="android:Widget.Material.Light.DatePicker">
|
||||||
|
<item name="android:datePickerMode">spinner</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- Default style for TimePicker - in spinner mode -->
|
||||||
|
<style name="SpinnerTimePicker" parent="android:Widget.Material.Light.TimePicker">
|
||||||
|
<item name="android:timePickerMode">spinner</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="NativeScriptToolbarStyle" parent="NativeScriptToolbarStyleBase">
|
||||||
|
<item name="android:elevation">4dp</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="ns_primary">#F5F5F5</color>
|
||||||
|
<color name="ns_primaryDark">#757575</color>
|
||||||
|
<color name="ns_accent">#33B5E5</color>
|
||||||
|
<color name="ns_blue">#272734</color>
|
||||||
|
</resources>
|
@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<!-- theme to use FOR launch screen-->
|
||||||
|
<style name="LaunchScreenThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
|
||||||
|
<item name="toolbarStyle">@style/NativeScriptToolbarStyle</item>
|
||||||
|
|
||||||
|
<item name="colorPrimary">@color/ns_primary</item>
|
||||||
|
<item name="colorPrimaryDark">@color/ns_primaryDark</item>
|
||||||
|
<item name="colorAccent">@color/ns_accent</item>
|
||||||
|
|
||||||
|
<item name="android:windowBackground">@drawable/splash_screen</item>
|
||||||
|
|
||||||
|
<item name="android:windowActionBarOverlay">true</item>
|
||||||
|
<item name="android:windowTranslucentStatus">true</item>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="LaunchScreenTheme" parent="LaunchScreenThemeBase">
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- theme to use AFTER launch screen is loaded-->
|
||||||
|
<style name="AppThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
|
||||||
|
<item name="toolbarStyle">@style/NativeScriptToolbarStyle</item>
|
||||||
|
|
||||||
|
<item name="colorPrimary">@color/ns_primary</item>
|
||||||
|
<item name="colorPrimaryDark">@color/ns_primaryDark</item>
|
||||||
|
<item name="colorAccent">@color/ns_accent</item>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="AppTheme" parent="AppThemeBase">
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- theme for action-bar -->
|
||||||
|
<style name="NativeScriptToolbarStyleBase" parent="Widget.AppCompat.Toolbar">
|
||||||
|
<item name="android:background">@color/ns_primary</item>
|
||||||
|
<item name="theme">@style/ThemeOverlay.AppCompat.ActionBar</item>
|
||||||
|
<item name="popupTheme">@style/ThemeOverlay.AppCompat</item>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="NativeScriptToolbarStyle" parent="NativeScriptToolbarStyleBase">
|
||||||
|
</style>
|
||||||
|
</resources>
|
@ -0,0 +1,122 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"size" : "20x20",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "icon-20@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "20x20",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "icon-20@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "29x29",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "icon-29.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "29x29",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "icon-29@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "29x29",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "icon-29@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "40x40",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "icon-40@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "40x40",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "icon-40@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "60x60",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "icon-60@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "60x60",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "icon-60@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "20x20",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "icon-20.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "20x20",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "icon-20@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "29x29",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "icon-29.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "29x29",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "icon-29@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "40x40",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "icon-40.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "40x40",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "icon-40@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "76x76",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "icon-76.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "76x76",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "icon-76@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "83.5x83.5",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "icon-83.5@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "1024x1024",
|
||||||
|
"idiom" : "ios-marketing",
|
||||||
|
"filename" : "icon-1024.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 99 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 28 KiB |
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,212 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"subtype" : "2688h",
|
||||||
|
"filename" : "Default-Portrait-XS-Max.png",
|
||||||
|
"minimum-system-version" : "12.0",
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"subtype" : "2688h",
|
||||||
|
"filename" : "Default-Landscape-XS-Max.png",
|
||||||
|
"minimum-system-version" : "12.0",
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"subtype" : "1792h",
|
||||||
|
"filename" : "Default-Portrait-XR.png",
|
||||||
|
"minimum-system-version" : "12.0",
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"subtype" : "1792h",
|
||||||
|
"filename" : "Default-Landscape-XR.png",
|
||||||
|
"minimum-system-version" : "12.0",
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"subtype" : "2436h",
|
||||||
|
"filename" : "Default-1125h.png",
|
||||||
|
"minimum-system-version" : "11.0",
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"subtype" : "2436h",
|
||||||
|
"filename" : "Default-Landscape-X.png",
|
||||||
|
"minimum-system-version" : "11.0",
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"subtype" : "736h",
|
||||||
|
"filename" : "Default-736h@3x.png",
|
||||||
|
"minimum-system-version" : "8.0",
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"subtype" : "736h",
|
||||||
|
"filename" : "Default-Landscape@3x.png",
|
||||||
|
"minimum-system-version" : "8.0",
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"subtype" : "667h",
|
||||||
|
"filename" : "Default-667h@2x.png",
|
||||||
|
"minimum-system-version" : "8.0",
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Default@2x.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"minimum-system-version" : "7.0",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"subtype" : "retina4",
|
||||||
|
"filename" : "Default-568h@2x.png",
|
||||||
|
"minimum-system-version" : "7.0",
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default-Portrait.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"minimum-system-version" : "7.0",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default-Landscape.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"minimum-system-version" : "7.0",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default-Portrait@2x.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"minimum-system-version" : "7.0",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default-Landscape@2x.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"minimum-system-version" : "7.0",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Default.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Default@2x.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Default-568h@2x.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"subtype" : "retina4",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"extent" : "to-status-bar",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default-Portrait.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"extent" : "to-status-bar",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default-Landscape.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"extent" : "to-status-bar",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default-Portrait@2x.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"extent" : "to-status-bar",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "landscape",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Default-Landscape@2x.png",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"scale" : "2x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 180 KiB |
After Width: | Height: | Size: 165 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 187 KiB |
After Width: | Height: | Size: 198 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 182 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 61 KiB |
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "LaunchScreen-AspectFill.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "LaunchScreen-AspectFill@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "LaunchScreen-AspectFill@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 34 KiB |
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "LaunchScreen-Center.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "LaunchScreen-Center@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "LaunchScreen-Center@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 202 KiB |
After Width: | Height: | Size: 92 KiB |
47
e2e/scoped-packages/app/App_Resources/iOS/Info.plist
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>${PRODUCT_NAME}</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>${PRODUCT_NAME}</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
<true/>
|
||||||
|
<key>UILaunchStoryboardName</key>
|
||||||
|
<string>LaunchScreen</string>
|
||||||
|
<key>UIRequiresFullScreen</key>
|
||||||
|
<true/>
|
||||||
|
<key>UIRequiredDeviceCapabilities</key>
|
||||||
|
<array>
|
||||||
|
<string>armv7</string>
|
||||||
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,53 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||||
|
<device id="retina5_9" orientation="portrait">
|
||||||
|
<adaptation id="fullscreen"/>
|
||||||
|
</device>
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<scenes>
|
||||||
|
<!--View Controller-->
|
||||||
|
<scene sceneID="EHf-IW-A2E">
|
||||||
|
<objects>
|
||||||
|
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||||
|
<layoutGuides>
|
||||||
|
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
|
||||||
|
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
|
||||||
|
</layoutGuides>
|
||||||
|
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LaunchScreen.AspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="wtH-rr-YfP">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||||
|
</imageView>
|
||||||
|
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LaunchScreen.Center" translatesAutoresizingMaskIntoConstraints="NO" id="s1z-aa-wYv">
|
||||||
|
<rect key="frame" x="0.0" y="150" width="375" height="512"/>
|
||||||
|
</imageView>
|
||||||
|
</subviews>
|
||||||
|
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="s1z-aa-wYv" secondAttribute="trailing" id="4Rf-kf-vql"/>
|
||||||
|
<constraint firstAttribute="bottom" secondItem="wtH-rr-YfP" secondAttribute="bottom" id="5CS-At-4ka"/>
|
||||||
|
<constraint firstItem="wtH-rr-YfP" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="Awn-b8-xf1"/>
|
||||||
|
<constraint firstItem="s1z-aa-wYv" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="BpJ-vb-eKA"/>
|
||||||
|
<constraint firstItem="s1z-aa-wYv" firstAttribute="trailing" secondItem="wtH-rr-YfP" secondAttribute="trailing" id="QIM-7J-OZz"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="wtH-rr-YfP" secondAttribute="trailing" id="RXg-rW-UK8"/>
|
||||||
|
<constraint firstItem="s1z-aa-wYv" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="Rcp-LG-48z"/>
|
||||||
|
<constraint firstItem="wtH-rr-YfP" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="cch-8E-tYu"/>
|
||||||
|
</constraints>
|
||||||
|
</view>
|
||||||
|
</viewController>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
|
</objects>
|
||||||
|
<point key="canvasLocation" x="509.60000000000002" y="237.93103448275863"/>
|
||||||
|
</scene>
|
||||||
|
</scenes>
|
||||||
|
<resources>
|
||||||
|
<image name="LaunchScreen.AspectFill" width="768" height="1024"/>
|
||||||
|
<image name="LaunchScreen.Center" width="384" height="512"/>
|
||||||
|
</resources>
|
||||||
|
</document>
|
7
e2e/scoped-packages/app/App_Resources/iOS/build.xcconfig
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
// You can add custom settings here
|
||||||
|
// for example you can uncomment the following line to force distribution code signing
|
||||||
|
// CODE_SIGN_IDENTITY = iPhone Distribution
|
||||||
|
// To build for device with XCode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
|
||||||
|
// DEVELOPMENT_TEAM = YOUR_TEAM_ID;
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
2
e2e/scoped-packages/app/app-root.xml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<Frame defaultPage="main-page">
|
||||||
|
</Frame>
|
21
e2e/scoped-packages/app/app.css
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
In NativeScript, the app.css file is where you place CSS rules that
|
||||||
|
you would like to apply to your entire application. Check out
|
||||||
|
http://docs.nativescript.org/ui/styling for a full list of the CSS
|
||||||
|
selectors and properties you can use to style UI components.
|
||||||
|
|
||||||
|
/*
|
||||||
|
In many cases you may want to use the NativeScript core theme instead
|
||||||
|
of writing your own CSS rules. For a full list of class names in the theme
|
||||||
|
refer to http://docs.nativescript.org/ui/theme.
|
||||||
|
The imported CSS rules must precede all other types of rules.
|
||||||
|
*/
|
||||||
|
@import '~nativescript-theme-core/css/core.light.css';
|
||||||
|
|
||||||
|
/*
|
||||||
|
The following CSS rule changes the font size of all UI
|
||||||
|
components that have the btn class name.
|
||||||
|
*/
|
||||||
|
.btn {
|
||||||
|
font-size: 18;
|
||||||
|
}
|
14
e2e/scoped-packages/app/app.ts
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
In NativeScript, the app.ts file is the entry point to your application.
|
||||||
|
You can use this file to perform app-level initialization, but the primary
|
||||||
|
purpose of the file is to pass control to the app’s first module.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import * as application from "tns-core-modules/application";
|
||||||
|
|
||||||
|
application.run({ moduleName: "app-root" });
|
||||||
|
|
||||||
|
/*
|
||||||
|
Do not place any code after the application has been started as it will not
|
||||||
|
be executed on iOS.
|
||||||
|
*/
|
21
e2e/scoped-packages/app/generated-tests/module-compare.ts
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
const results = { errors: new Array<string>(), modules: 0, exports: 0 };
|
||||||
|
|
||||||
|
export function compare(name: string, core: any, compat: any) {
|
||||||
|
results.modules++;
|
||||||
|
for (const key in core) {
|
||||||
|
results.exports++;
|
||||||
|
if (core[key] !== compat[key]) {
|
||||||
|
results.errors.push(`ERROR: Diff in module: ${name} key: ${key}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function report() {
|
||||||
|
console.log(`CHECKED COMPLETED. CHECKED MODULES: ${results.modules} EXPORTS: ${results.exports}`);
|
||||||
|
if (results.errors.length) {
|
||||||
|
console.log(`----- ${results.errors.length} CHECKS FAILED ----- `);
|
||||||
|
results.errors.forEach((err) => console.log(err));
|
||||||
|
} else {
|
||||||
|
console.log("----- ALL CHECKS SUCCESSFUL ----- ");
|
||||||
|
}
|
||||||
|
}
|