@rxap/environment 16.0.0-dev.0 → 16.0.0-dev.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/CHANGELOG.md +238 -0
  2. package/LICENSE +621 -27
  3. package/LICENSE.md +621 -0
  4. package/README.md +7 -23
  5. package/esm2022/index.mjs +4 -1
  6. package/esm2022/lib/determine-production-environment-name.mjs +15 -0
  7. package/esm2022/lib/determine-release-name.mjs +10 -0
  8. package/esm2022/lib/environment/environment.component.mjs +8 -9
  9. package/esm2022/lib/environment/environment.component.module.mjs +11 -14
  10. package/esm2022/lib/environment/tokens.mjs +1 -1
  11. package/esm2022/lib/environment.mjs +1 -1
  12. package/esm2022/lib/is-not-release-version.mjs +17 -0
  13. package/esm2022/lib/update-environment.mjs +4 -3
  14. package/esm2022/rxap-environment.mjs +1 -1
  15. package/fesm2022/rxap-environment.mjs +59 -18
  16. package/fesm2022/rxap-environment.mjs.map +1 -1
  17. package/index.d.ts +3 -0
  18. package/lib/determine-production-environment-name.d.ts +2 -0
  19. package/lib/determine-release-name.d.ts +2 -0
  20. package/lib/environment/environment.component.d.ts +1 -1
  21. package/lib/environment/environment.component.module.d.ts +1 -2
  22. package/lib/environment.d.ts +17 -0
  23. package/lib/is-not-release-version.d.ts +2 -0
  24. package/lib/update-environment.d.ts +2 -1
  25. package/package.json +30 -31
  26. package/src/lib/environment/_environment.component.theme.scss +20 -0
  27. package/theme.css +1 -0
  28. package/collection.json +0 -10
  29. package/migration.json +0 -4
  30. package/src/schematics/ng-add/index.d.ts +0 -3
  31. package/src/schematics/ng-add/index.js +0 -57
  32. package/src/schematics/ng-add/index.js.map +0 -1
  33. package/src/schematics/ng-add/schema.json +0 -15
package/collection.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "schematics": {
3
- "ng-add": {
4
- "description": "Setup the package @rxap/environment for the workspace.",
5
- "factory": "./src/schematics/ng-add/index",
6
- "schema": "./src/schematics/ng-add/schema.json"
7
- }
8
- },
9
- "$schema": "../../node_modules/@angular-devkit/schematics/collection-schema.json"
10
- }
package/migration.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "schematics": {},
3
- "$schema": "../../node_modules/@angular-devkit/schematics/collection-schema.json"
4
- }
@@ -1,3 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- import { NgAddSchema } from './schema';
3
- export default function (options: NgAddSchema): Rule;
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const schematics_1 = require("@angular-devkit/schematics");
4
- const schematics_utilities_1 = require("@rxap/schematics-utilities");
5
- const ts_morph_1 = require("ts-morph");
6
- const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
7
- function default_1(options) {
8
- return (host) => {
9
- const rules = [
10
- (0, schematics_utilities_1.InstallPeerDependencies)()
11
- ];
12
- if (options.project) {
13
- const projectSourceRoot = (0, schematics_utilities_1.GetProjectSourceRoot)(host, options.project);
14
- const project = new ts_morph_1.Project({
15
- useInMemoryFileSystem: true,
16
- manipulationSettings: { quoteKind: ts_morph_1.QuoteKind.Single, indentationText: ts_morph_1.IndentationText.TwoSpaces }
17
- });
18
- (0, schematics_ts_morph_1.AddDir)(host.getDir(projectSourceRoot), project);
19
- const appModelSourceFile = project.getSourceFile('/app/app.module.ts');
20
- if (!appModelSourceFile) {
21
- throw new schematics_1.SchematicsException(`Could not find the AppModule source file in '[projectSourceRoot]/app/app.module.ts'`);
22
- }
23
- (0, schematics_ts_morph_1.AddNgModuleProvider)(appModelSourceFile, {
24
- provide: 'RXAP_ENVIRONMENT',
25
- useValue: 'environment'
26
- }, [
27
- {
28
- namedImports: ['RXAP_ENVIRONMENT'],
29
- moduleSpecifier: '@rxap/environment'
30
- },
31
- {
32
- namedImports: ['environment'],
33
- moduleSpecifier: '../environments/environment'
34
- }
35
- ]);
36
- const mainSourceFile = project.getSourceFile('/main.ts');
37
- if (!mainSourceFile) {
38
- throw new schematics_1.SchematicsException(`Could not find the main.ts source file in '[projectSourceRoot]/main.ts'`);
39
- }
40
- (0, schematics_ts_morph_1.AddToArray)(mainSourceFile, 'setup', 'UpdateEnvironment(environment)', 'Promise<any>[]');
41
- mainSourceFile.addImportDeclarations([
42
- {
43
- namedImports: ['UpdateEnvironment'],
44
- moduleSpecifier: '@rxap/environment'
45
- },
46
- {
47
- namedImports: ['environment'],
48
- moduleSpecifier: './environments/environment'
49
- }
50
- ]);
51
- rules.push((0, schematics_ts_morph_1.ApplyTsMorphProject)(project, projectSourceRoot));
52
- }
53
- return (0, schematics_1.chain)(rules);
54
- };
55
- }
56
- exports.default = default_1;
57
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/environment/src/schematics/ng-add/index.ts"],"names":[],"mappings":";;AAAA,2DAKoC;AACpC,qEAGoC;AAEpC,uCAIkB;AAClB,mEAKmC;AAEnC,mBAAwB,OAAoB;IAC1C,OAAO,CAAC,IAAU,EAAE,EAAE;QAEpB,MAAM,KAAK,GAAW;YACpB,IAAA,8CAAuB,GAAE;SAC1B,CAAC;QAEF,IAAI,OAAO,CAAC,OAAO,EAAE;YACnB,MAAM,iBAAiB,GAAG,IAAA,2CAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YACtE,MAAM,OAAO,GAAa,IAAI,kBAAO,CAAC;gBACpC,qBAAqB,EAAE,IAAI;gBAC3B,oBAAoB,EAAG,EAAE,SAAS,EAAE,oBAAS,CAAC,MAAM,EAAE,eAAe,EAAE,0BAAe,CAAC,SAAS,EAAE;aACnG,CAAC,CAAC;YACH,IAAA,4BAAM,EAAC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,CAAC;YAEhD,MAAM,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC;YAEvE,IAAI,CAAC,kBAAkB,EAAE;gBACvB,MAAM,IAAI,gCAAmB,CAAC,qFAAqF,CAAC,CAAC;aACtH;YAED,IAAA,yCAAmB,EACjB,kBAAkB,EAClB;gBACE,OAAO,EAAG,kBAAkB;gBAC5B,QAAQ,EAAE,aAAa;aACxB,EACD;gBACE;oBACE,YAAY,EAAK,CAAE,kBAAkB,CAAE;oBACvC,eAAe,EAAE,mBAAmB;iBACrC;gBACD;oBACE,YAAY,EAAK,CAAE,aAAa,CAAE;oBAClC,eAAe,EAAE,6BAA6B;iBAC/C;aACF,CACF,CAAC;YAEF,MAAM,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAEzD,IAAI,CAAC,cAAc,EAAE;gBACnB,MAAM,IAAI,gCAAmB,CAAC,yEAAyE,CAAC,CAAC;aAC1G;YAED,IAAA,gCAAU,EACR,cAAc,EACd,OAAO,EACP,gCAAgC,EAChC,gBAAgB,CACjB,CAAC;YAEF,cAAc,CAAC,qBAAqB,CAAC;gBACnC;oBACE,YAAY,EAAK,CAAE,mBAAmB,CAAE;oBACxC,eAAe,EAAE,mBAAmB;iBACrC;gBACD;oBACE,YAAY,EAAK,CAAE,aAAa,CAAE;oBAClC,eAAe,EAAE,4BAA4B;iBAC9C;aACF,CAAC,CAAC;YAEH,KAAK,CAAC,IAAI,CAAC,IAAA,yCAAmB,EAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC;SAC7D;QAED,OAAO,IAAA,kBAAK,EAAC,KAAK,CAAC,CAAC;IAEtB,CAAC,CAAC;AACJ,CAAC;AArED,4BAqEC"}
@@ -1,15 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema",
3
- "$id": "environment-ng-add",
4
- "type": "object",
5
- "properties": {
6
- "project": {
7
- "type": "string",
8
- "description": "The project where the environment feature should be added",
9
- "$default": {
10
- "$source": "projectName"
11
- }
12
- }
13
- },
14
- "required": []
15
- }