zephyr-edge-contract 0.0.13 → 0.0.15

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 (50) hide show
  1. package/dist/index.d.ts +14 -6
  2. package/dist/index.js +13 -3
  3. package/dist/index.js.map +1 -1
  4. package/dist/lib/api-contract-negotiation/get-api-contract.d.ts +7 -6
  5. package/dist/lib/api-contract-negotiation/get-api-contract.js +9 -7
  6. package/dist/lib/api-contract-negotiation/get-api-contract.js.map +1 -1
  7. package/dist/lib/edge-api/publish-request.d.ts +28 -0
  8. package/dist/lib/edge-api/publish-request.js +3 -0
  9. package/dist/lib/edge-api/publish-request.js.map +1 -0
  10. package/dist/lib/node-persist/app-deploy-result-cache.d.ts +7 -0
  11. package/dist/lib/node-persist/app-deploy-result-cache.js +33 -0
  12. package/dist/lib/node-persist/app-deploy-result-cache.js.map +1 -0
  13. package/dist/lib/node-persist/application-configuration.d.ts +13 -0
  14. package/dist/lib/node-persist/application-configuration.js +1 -1
  15. package/dist/lib/node-persist/application-configuration.js.map +1 -1
  16. package/dist/lib/node-persist/hash-cache.js.map +1 -1
  17. package/dist/lib/node-persist/storage-keys.d.ts +2 -1
  18. package/dist/lib/node-persist/token.js +5 -0
  19. package/dist/lib/node-persist/token.js.map +1 -1
  20. package/dist/lib/node-persist/upload-provider-options.d.ts +18 -0
  21. package/dist/lib/node-persist/upload-provider-options.js +12 -0
  22. package/dist/lib/node-persist/upload-provider-options.js.map +1 -0
  23. package/dist/lib/plugin-options/zephyr-plugin-options.d.ts +1 -0
  24. package/dist/lib/snapshot.d.ts +3 -0
  25. package/dist/lib/utils/debug-enabled.d.ts +1 -0
  26. package/dist/lib/utils/debug-enabled.js +9 -0
  27. package/dist/lib/utils/debug-enabled.js.map +1 -0
  28. package/dist/lib/utils/debug.d.ts +4 -1
  29. package/dist/lib/utils/debug.js +16 -11
  30. package/dist/lib/utils/debug.js.map +1 -1
  31. package/dist/lib/utils/error-types.d.ts +27 -0
  32. package/dist/lib/utils/error-types.js +69 -0
  33. package/dist/lib/utils/error-types.js.map +1 -0
  34. package/dist/lib/utils/picocolor.d.ts +42 -0
  35. package/dist/lib/utils/picocolor.js +93 -0
  36. package/dist/lib/utils/picocolor.js.map +1 -0
  37. package/dist/lib/utils/ze-http-request.js +5 -3
  38. package/dist/lib/utils/ze-http-request.js.map +1 -1
  39. package/dist/lib/zephyr-build-stats.d.ts +80 -0
  40. package/dist/lib/zephyr-build-stats.js +11 -0
  41. package/dist/lib/zephyr-build-stats.js.map +1 -0
  42. package/dist/lib/zephyr-edge-contract.d.ts +3 -0
  43. package/dist/package.json +1 -1
  44. package/package.json +1 -1
  45. package/.eslintrc.json +0 -25
  46. package/jest.config.ts +0 -11
  47. package/project.json +0 -34
  48. package/tsconfig.json +0 -23
  49. package/tsconfig.lib.json +0 -10
  50. package/tsconfig.spec.json +0 -14
package/dist/index.d.ts CHANGED
@@ -2,19 +2,27 @@ export { createApplicationUID } from './lib/utils/create-application-u-i-d';
2
2
  export { createSnapshotId } from './lib/utils/create-snapshot-id';
3
3
  export { ZeAppVersion, ZeAppVersionResponse } from './lib/ze-api/app-version';
4
4
  export { ZeApplicationList } from './lib/ze-api/app-list';
5
- export { Snapshot, SnapshotAsset } from './lib/snapshot';
5
+ export { Snapshot, SnapshotAsset, SnapshotMetadata } from './lib/snapshot';
6
6
  export { ZeEnvs, ZeUploadBuildStats } from './lib/edge-api/ze-envs-request';
7
7
  export * from './lib/zephyr-edge-contract';
8
8
  export * as _hash_cache from './lib/node-persist/hash-cache';
9
9
  export * as _fs_cache from './lib/node-persist/fs-cache';
10
- export { ZeApplicationConfig, getAppConfig, remoteAppConfig, saveAppConfig, } from './lib/node-persist/application-configuration';
11
- export { getPartialAssetMap, removePartialAssetMap, savePartialAssetMap, } from './lib/node-persist/partial-assets-map';
10
+ export { ZeApplicationConfig, NetlifyIntegrationConfig, getAppConfig, remoteAppConfig, saveAppConfig, } from './lib/node-persist/application-configuration';
11
+ export * from './lib/utils/picocolor';
12
+ export { getPartialAssetMap, removePartialAssetMap, savePartialAssetMap } from './lib/node-persist/partial-assets-map';
12
13
  export { getSecretToken } from './lib/node-persist/secret-token';
13
- export { saveToken, getToken, removeToken, cleanTokens, } from './lib/node-persist/token';
14
+ export { saveToken, getToken, removeToken, cleanTokens } from './lib/node-persist/token';
14
15
  export { ZephyrPluginOptions } from './lib/plugin-options/zephyr-plugin-options';
15
- export { ZEPHYR_API_ENDPOINT, v2_api_paths, } from './lib/api-contract-negotiation/get-api-contract';
16
- export { ze_log, ze_error, is_debug_enabled } from './lib/utils/debug';
16
+ export { ZEPHYR_API_ENDPOINT, ZE_API_ENDPOINT, ze_api_gateway } from './lib/api-contract-negotiation/get-api-contract';
17
+ export * as color from './lib/utils/picocolor';
18
+ export * from './lib/utils/debug-enabled';
19
+ export { ze_log, ze_error, brightBlueBgName, brightRedBgName, brightYellowBgName, dimmedName } from './lib/utils/debug';
17
20
  export { safe_json_parse } from './lib/utils/safe-json-parse';
18
21
  export { request } from './lib/utils/ze-http-request';
22
+ export * as colors from './lib/utils/picocolor';
19
23
  export { LocalPackageJson } from './lib/ze-api/local-package-json';
20
24
  export { ConvertedGraph } from './lib/ze-api/converted-graph';
25
+ export * from './lib/node-persist/upload-provider-options';
26
+ export * as appDeployResultCache from './lib/node-persist/app-deploy-result-cache';
27
+ export { ZephyrBuildStats } from './lib/zephyr-build-stats';
28
+ export { PublishRequest, StageZeroPublishRequest } from './lib/edge-api/publish-request';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.request = exports.safe_json_parse = exports.is_debug_enabled = exports.ze_error = exports.ze_log = exports.v2_api_paths = exports.ZEPHYR_API_ENDPOINT = exports.cleanTokens = exports.removeToken = exports.getToken = exports.saveToken = exports.getSecretToken = exports.savePartialAssetMap = exports.removePartialAssetMap = exports.getPartialAssetMap = exports.saveAppConfig = exports.remoteAppConfig = exports.getAppConfig = exports._fs_cache = exports._hash_cache = exports.createSnapshotId = exports.createApplicationUID = void 0;
3
+ exports.appDeployResultCache = exports.colors = exports.request = exports.safe_json_parse = exports.dimmedName = exports.brightYellowBgName = exports.brightRedBgName = exports.brightBlueBgName = exports.ze_error = exports.ze_log = exports.color = exports.ze_api_gateway = exports.ZE_API_ENDPOINT = exports.ZEPHYR_API_ENDPOINT = exports.cleanTokens = exports.removeToken = exports.getToken = exports.saveToken = exports.getSecretToken = exports.savePartialAssetMap = exports.removePartialAssetMap = exports.getPartialAssetMap = exports.saveAppConfig = exports.remoteAppConfig = exports.getAppConfig = exports._fs_cache = exports._hash_cache = exports.createSnapshotId = exports.createApplicationUID = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  var create_application_u_i_d_1 = require("./lib/utils/create-application-u-i-d");
6
6
  Object.defineProperty(exports, "createApplicationUID", { enumerable: true, get: function () { return create_application_u_i_d_1.createApplicationUID; } });
@@ -13,6 +13,7 @@ var application_configuration_1 = require("./lib/node-persist/application-config
13
13
  Object.defineProperty(exports, "getAppConfig", { enumerable: true, get: function () { return application_configuration_1.getAppConfig; } });
14
14
  Object.defineProperty(exports, "remoteAppConfig", { enumerable: true, get: function () { return application_configuration_1.remoteAppConfig; } });
15
15
  Object.defineProperty(exports, "saveAppConfig", { enumerable: true, get: function () { return application_configuration_1.saveAppConfig; } });
16
+ tslib_1.__exportStar(require("./lib/utils/picocolor"), exports);
16
17
  var partial_assets_map_1 = require("./lib/node-persist/partial-assets-map");
17
18
  Object.defineProperty(exports, "getPartialAssetMap", { enumerable: true, get: function () { return partial_assets_map_1.getPartialAssetMap; } });
18
19
  Object.defineProperty(exports, "removePartialAssetMap", { enumerable: true, get: function () { return partial_assets_map_1.removePartialAssetMap; } });
@@ -26,13 +27,22 @@ Object.defineProperty(exports, "removeToken", { enumerable: true, get: function
26
27
  Object.defineProperty(exports, "cleanTokens", { enumerable: true, get: function () { return token_1.cleanTokens; } });
27
28
  var get_api_contract_1 = require("./lib/api-contract-negotiation/get-api-contract");
28
29
  Object.defineProperty(exports, "ZEPHYR_API_ENDPOINT", { enumerable: true, get: function () { return get_api_contract_1.ZEPHYR_API_ENDPOINT; } });
29
- Object.defineProperty(exports, "v2_api_paths", { enumerable: true, get: function () { return get_api_contract_1.v2_api_paths; } });
30
+ Object.defineProperty(exports, "ZE_API_ENDPOINT", { enumerable: true, get: function () { return get_api_contract_1.ZE_API_ENDPOINT; } });
31
+ Object.defineProperty(exports, "ze_api_gateway", { enumerable: true, get: function () { return get_api_contract_1.ze_api_gateway; } });
32
+ exports.color = tslib_1.__importStar(require("./lib/utils/picocolor"));
33
+ tslib_1.__exportStar(require("./lib/utils/debug-enabled"), exports);
30
34
  var debug_1 = require("./lib/utils/debug");
31
35
  Object.defineProperty(exports, "ze_log", { enumerable: true, get: function () { return debug_1.ze_log; } });
32
36
  Object.defineProperty(exports, "ze_error", { enumerable: true, get: function () { return debug_1.ze_error; } });
33
- Object.defineProperty(exports, "is_debug_enabled", { enumerable: true, get: function () { return debug_1.is_debug_enabled; } });
37
+ Object.defineProperty(exports, "brightBlueBgName", { enumerable: true, get: function () { return debug_1.brightBlueBgName; } });
38
+ Object.defineProperty(exports, "brightRedBgName", { enumerable: true, get: function () { return debug_1.brightRedBgName; } });
39
+ Object.defineProperty(exports, "brightYellowBgName", { enumerable: true, get: function () { return debug_1.brightYellowBgName; } });
40
+ Object.defineProperty(exports, "dimmedName", { enumerable: true, get: function () { return debug_1.dimmedName; } });
34
41
  var safe_json_parse_1 = require("./lib/utils/safe-json-parse");
35
42
  Object.defineProperty(exports, "safe_json_parse", { enumerable: true, get: function () { return safe_json_parse_1.safe_json_parse; } });
36
43
  var ze_http_request_1 = require("./lib/utils/ze-http-request");
37
44
  Object.defineProperty(exports, "request", { enumerable: true, get: function () { return ze_http_request_1.request; } });
45
+ exports.colors = tslib_1.__importStar(require("./lib/utils/picocolor"));
46
+ tslib_1.__exportStar(require("./lib/node-persist/upload-provider-options"), exports);
47
+ exports.appDeployResultCache = tslib_1.__importStar(require("./lib/node-persist/app-deploy-result-cache"));
38
48
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,iFAA4E;AAAnE,gIAAA,oBAAoB,OAAA;AAC7B,qEAAkE;AAAzD,sHAAA,gBAAgB,OAAA;AAOzB,qEAA2C;AAE3C,qFAA6D;AAC7D,iFAAyD;AAEzD,0FAKsD;AAHpD,yHAAA,YAAY,OAAA;AACZ,4HAAA,eAAe,OAAA;AACf,0HAAA,aAAa,OAAA;AAGf,4EAI+C;AAH7C,wHAAA,kBAAkB,OAAA;AAClB,2HAAA,qBAAqB,OAAA;AACrB,yHAAA,mBAAmB,OAAA;AAGrB,gEAAiE;AAAxD,8GAAA,cAAc,OAAA;AAEvB,kDAKkC;AAJhC,kGAAA,SAAS,OAAA;AACT,iGAAA,QAAQ,OAAA;AACR,oGAAA,WAAW,OAAA;AACX,oGAAA,WAAW,OAAA;AAKb,oFAGyD;AAFvD,uHAAA,mBAAmB,OAAA;AACnB,gHAAA,YAAY,OAAA;AAGd,2CAAuE;AAA9D,+FAAA,MAAM,OAAA;AAAE,iGAAA,QAAQ,OAAA;AAAE,yGAAA,gBAAgB,OAAA;AAC3C,+DAA8D;AAArD,kHAAA,eAAe,OAAA;AACxB,+DAAsD;AAA7C,0GAAA,OAAO,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,iFAA4E;AAAnE,gIAAA,oBAAoB,OAAA;AAC7B,qEAAkE;AAAzD,sHAAA,gBAAgB,OAAA;AAOzB,qEAA2C;AAE3C,qFAA6D;AAC7D,iFAAyD;AACzD,0FAMsD;AAHpD,yHAAA,YAAY,OAAA;AACZ,4HAAA,eAAe,OAAA;AACf,0HAAA,aAAa,OAAA;AAEf,gEAAsC;AACtC,4EAAuH;AAA9G,wHAAA,kBAAkB,OAAA;AAAE,2HAAA,qBAAqB,OAAA;AAAE,yHAAA,mBAAmB,OAAA;AAEvE,gEAAiE;AAAxD,8GAAA,cAAc,OAAA;AAEvB,kDAAyF;AAAhF,kGAAA,SAAS,OAAA;AAAE,iGAAA,QAAQ,OAAA;AAAE,oGAAA,WAAW,OAAA;AAAE,oGAAA,WAAW,OAAA;AAItD,oFAAuH;AAA9G,uHAAA,mBAAmB,OAAA;AAAE,mHAAA,eAAe,OAAA;AAAE,kHAAA,cAAc,OAAA;AAC7D,uEAA+C;AAC/C,oEAA0C;AAC1C,2CAAwH;AAA/G,+FAAA,MAAM,OAAA;AAAE,iGAAA,QAAQ,OAAA;AAAE,yGAAA,gBAAgB,OAAA;AAAE,wGAAA,eAAe,OAAA;AAAE,2GAAA,kBAAkB,OAAA;AAAE,mGAAA,UAAU,OAAA;AAC5F,+DAA8D;AAArD,kHAAA,eAAe,OAAA;AACxB,+DAAsD;AAA7C,0GAAA,OAAO,OAAA;AAChB,wEAAgD;AAIhD,qFAA2D;AAC3D,2GAAmF"}
@@ -1,8 +1,9 @@
1
1
  export declare const ZEPHYR_API_ENDPOINT: () => string;
2
- export declare const v2_api_paths: {
3
- application_logs: string;
4
- dashboard_path: string;
5
- resolve_dependency_path: string;
6
- authorize_link: string;
7
- application_configuration: string;
2
+ export declare const ZE_API_ENDPOINT: () => string;
3
+ export declare const ze_api_gateway: {
4
+ logs: string;
5
+ build_stats: string;
6
+ auth_link: string;
7
+ resolve: string;
8
+ application_config: string;
8
9
  };
@@ -1,13 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.v2_api_paths = exports.ZEPHYR_API_ENDPOINT = void 0;
3
+ exports.ze_api_gateway = exports.ZE_API_ENDPOINT = exports.ZEPHYR_API_ENDPOINT = void 0;
4
4
  const ZEPHYR_API_ENDPOINT = () => { var _a; return (_a = process.env['ZE_API']) !== null && _a !== void 0 ? _a : 'https://api.zephyr-cloud.io'; };
5
5
  exports.ZEPHYR_API_ENDPOINT = ZEPHYR_API_ENDPOINT;
6
- exports.v2_api_paths = {
7
- application_logs: '/v2/application/logs',
8
- dashboard_path: '/v2/builder-packages-api/upload-from-dashboard-plugin',
9
- resolve_dependency_path: '/v2/builder-public-api/resolve',
10
- authorize_link: '/v2/authorize-link',
11
- application_configuration: '/v2/builder-packages-api/application-config',
6
+ const ZE_API_ENDPOINT = () => { var _a; return (_a = process.env['ZE_API_GATE']) !== null && _a !== void 0 ? _a : 'https://zeapi.valorkin.dev'; };
7
+ exports.ZE_API_ENDPOINT = ZE_API_ENDPOINT;
8
+ exports.ze_api_gateway = {
9
+ logs: '/logs',
10
+ build_stats: '/build-stats',
11
+ auth_link: '/auth-link',
12
+ resolve: '/resolve',
13
+ application_config: '/application-config',
12
14
  };
13
15
  //# sourceMappingURL=get-api-contract.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-api-contract.js","sourceRoot":"","sources":["../../../src/lib/api-contract-negotiation/get-api-contract.ts"],"names":[],"mappings":";;;AAAO,MAAM,mBAAmB,GAAG,GAAG,EAAE,WACtC,OAAA,MAAA,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,mCAAI,6BAA6B,CAAA,EAAA,CAAC;AAD5C,QAAA,mBAAmB,uBACyB;AAE5C,QAAA,YAAY,GAAG;IAC1B,gBAAgB,EAAE,sBAAsB;IACxC,cAAc,EAAE,uDAAuD;IACvE,uBAAuB,EAAE,gCAAgC;IACzD,cAAc,EAAE,oBAAoB;IACpC,yBAAyB,EAAE,6CAA6C;CACzE,CAAC"}
1
+ {"version":3,"file":"get-api-contract.js","sourceRoot":"","sources":["../../../src/lib/api-contract-negotiation/get-api-contract.ts"],"names":[],"mappings":";;;AAAO,MAAM,mBAAmB,GAAG,GAAG,EAAE,WAAC,OAAA,MAAA,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,mCAAI,6BAA6B,CAAA,EAAA,CAAC;AAAnF,QAAA,mBAAmB,uBAAgE;AAEzF,MAAM,eAAe,GAAG,GAAG,EAAE,WAAC,OAAA,MAAA,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,mCAAI,4BAA4B,CAAA,EAAA,CAAC;AAAnF,QAAA,eAAe,mBAAoE;AAEnF,QAAA,cAAc,GAAG;IAC5B,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,cAAc;IAC3B,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,UAAU;IACnB,kBAAkB,EAAE,qBAAqB;CAC1C,CAAC"}
@@ -0,0 +1,28 @@
1
+ interface PublishTarget {
2
+ url: string;
3
+ hostname: string;
4
+ }
5
+ export interface PublishRequest {
6
+ EDGE_URL: string;
7
+ application_uid: string;
8
+ app_version: {
9
+ snapshot_id?: string;
10
+ };
11
+ snapshot_id?: string;
12
+ user_uuid: string;
13
+ username: string;
14
+ can_write: boolean;
15
+ targets: {
16
+ version?: PublishTarget;
17
+ tags?: PublishTarget[];
18
+ ens?: PublishTarget[];
19
+ cnames?: PublishTarget[];
20
+ };
21
+ jwt: string;
22
+ }
23
+ export interface StageZeroPublishRequest {
24
+ application_uid: string;
25
+ snapshot_id: string;
26
+ target: PublishTarget;
27
+ }
28
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=publish-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish-request.js","sourceRoot":"","sources":["../../../src/lib/edge-api/publish-request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export declare function setAppDeployResult(application_uid: string, value: {
2
+ urls: string[];
3
+ }): Promise<void>;
4
+ export declare function getAppDeployResult(application_uid: string): Promise<{
5
+ urls: string[];
6
+ } | undefined>;
7
+ export declare function removeAppDeployResult(application_uid: string): Promise<void>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.removeAppDeployResult = exports.getAppDeployResult = exports.setAppDeployResult = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const node_persist_1 = require("node-persist");
6
+ const node_path_1 = require("node:path");
7
+ const node_os_1 = require("node:os");
8
+ const storage_keys_1 = require("./storage-keys");
9
+ const storage = (0, node_persist_1.init)({
10
+ dir: (0, node_path_1.join)((0, node_os_1.homedir)(), storage_keys_1.ZE_PATH),
11
+ });
12
+ function setAppDeployResult(application_uid, value) {
13
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
14
+ yield storage;
15
+ void (yield (0, node_persist_1.setItem)(`${"ze-app-deploy-result" /* StorageKeys.ze_app_deploy_result */}:${application_uid}`, value, { ttl: 1000 * 60 * 60 * 24 }));
16
+ });
17
+ }
18
+ exports.setAppDeployResult = setAppDeployResult;
19
+ function getAppDeployResult(application_uid) {
20
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
21
+ yield storage;
22
+ return (0, node_persist_1.getItem)(`${"ze-app-deploy-result" /* StorageKeys.ze_app_deploy_result */}:${application_uid}`);
23
+ });
24
+ }
25
+ exports.getAppDeployResult = getAppDeployResult;
26
+ function removeAppDeployResult(application_uid) {
27
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
28
+ yield storage;
29
+ yield (0, node_persist_1.removeItem)(`${"ze-app-deploy-result" /* StorageKeys.ze_app_deploy_result */}:${application_uid}`);
30
+ });
31
+ }
32
+ exports.removeAppDeployResult = removeAppDeployResult;
33
+ //# sourceMappingURL=app-deploy-result-cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-deploy-result-cache.js","sourceRoot":"","sources":["../../../src/lib/node-persist/app-deploy-result-cache.ts"],"names":[],"mappings":";;;;AAAA,+CAAkE;AAClE,yCAAiC;AACjC,qCAAkC;AAElC,iDAAsD;AAEtD,MAAM,OAAO,GAAG,IAAA,mBAAI,EAAC;IACnB,GAAG,EAAE,IAAA,gBAAI,EAAC,IAAA,iBAAO,GAAE,EAAE,sBAAO,CAAC;CAC9B,CAAC,CAAC;AAEH,SAAsB,kBAAkB,CACtC,eAAuB,EACvB,KAAyB;;QAEzB,MAAM,OAAO,CAAC;QACd,KAAK,CAAC,MAAM,IAAA,sBAAO,EACjB,GAAG,6DAAgC,IAAI,eAAe,EAAE,EACxD,KAAK,EACL,EAAE,GAAG,EAAE,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAC7B,CAAC,CAAC;IACL,CAAC;CAAA;AAVD,gDAUC;AAED,SAAsB,kBAAkB,CACtC,eAAuB;;QAEvB,MAAM,OAAO,CAAC;QACd,OAAO,IAAA,sBAAO,EAAC,GAAG,6DAAgC,IAAI,eAAe,EAAE,CAAC,CAAC;IAC3E,CAAC;CAAA;AALD,gDAKC;AAED,SAAsB,qBAAqB,CACzC,eAAuB;;QAEvB,MAAM,OAAO,CAAC;QACd,MAAM,IAAA,yBAAU,EAAC,GAAG,6DAAgC,IAAI,eAAe,EAAE,CAAC,CAAC;IAC7E,CAAC;CAAA;AALD,sDAKC"}
@@ -1,3 +1,8 @@
1
+ import { UploadProviderConfig } from './upload-provider-options';
2
+ export interface NetlifyIntegrationConfig {
3
+ api_token: string;
4
+ site_id: string;
5
+ }
1
6
  export interface ZeApplicationConfig {
2
7
  user_uuid: string;
3
8
  username: string;
@@ -6,7 +11,15 @@ export interface ZeApplicationConfig {
6
11
  AUTH0_DOMAIN: string;
7
12
  BUILD_ID_ENDPOINT: string;
8
13
  EDGE_URL: string;
14
+ DOMAIN?: string;
15
+ INTEGRATION_CONFIG?: NetlifyIntegrationConfig & {
16
+ type?: 'worker' | 'pages';
17
+ };
18
+ PLATFORM: 'cloudflare' | 'netlify';
9
19
  jwt: string;
20
+ uploadConfig: UploadProviderConfig;
21
+ application_uid: string;
22
+ fetched_at?: number;
10
23
  }
11
24
  export declare function saveAppConfig(application_uid: string, json: ZeApplicationConfig): Promise<void>;
12
25
  export declare function getAppConfig(application_uid: string): Promise<ZeApplicationConfig | undefined>;
@@ -15,7 +15,7 @@ function get_key(application_uid) {
15
15
  function saveAppConfig(application_uid, json) {
16
16
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
17
17
  yield storage;
18
- void (yield (0, node_persist_1.setItem)(get_key(application_uid), json));
18
+ void (yield (0, node_persist_1.setItem)(get_key(application_uid), json, { ttl: 5 * 60 * 1000 }));
19
19
  });
20
20
  }
21
21
  exports.saveAppConfig = saveAppConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"application-configuration.js","sourceRoot":"","sources":["../../../src/lib/node-persist/application-configuration.ts"],"names":[],"mappings":";;;;AAAA,+CAAkE;AAClE,qCAAkC;AAClC,yCAAiC;AACjC,iDAAsD;AAatD,MAAM,OAAO,GAAG,IAAA,mBAAI,EAAC;IACnB,GAAG,EAAE,IAAA,gBAAI,EAAC,IAAA,iBAAO,GAAE,EAAE,sBAAO,CAAC;CAC9B,CAAC,CAAC;AAEH,SAAS,OAAO,CAAC,eAAuB;IACtC,OAAO,uEAAkC,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtE,CAAC;AAED,SAAsB,aAAa,CACjC,eAAuB,EACvB,IAAyB;;QAEzB,MAAM,OAAO,CAAC;QACd,KAAK,CAAC,MAAM,IAAA,sBAAO,EAAC,OAAO,CAAC,eAAe,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IACvD,CAAC;CAAA;AAND,sCAMC;AAED,SAAsB,YAAY,CAChC,eAAuB;;QAEvB,MAAM,OAAO,CAAC;QACd,OAAO,IAAA,sBAAO,EAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;IAC3C,CAAC;CAAA;AALD,oCAKC;AAED,SAAsB,eAAe,CAAC,eAAuB;;QAC3D,MAAM,OAAO,CAAC;QACd,MAAM,IAAA,yBAAU,EAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;IAC7C,CAAC;CAAA;AAHD,0CAGC"}
1
+ {"version":3,"file":"application-configuration.js","sourceRoot":"","sources":["../../../src/lib/node-persist/application-configuration.ts"],"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G,+CAAyB,IAAI,eAAe,EAAE,CAAC,CAAC;IACpE,CAAC;CAAA;AALD,0CAKC;AAED,SAAsB,kBAAkB,CACtC,eAAuB;;QAEvB,MAAM,OAAO,CAAC;QACd,MAAM,IAAA,yBAAU,EAAC,GAAG,+CAAyB,IAAI,eAAe,EAAE,CAAC,CAAC;IACtE,CAAC;CAAA;AALD,gDAKC"}
@@ -5,5 +5,6 @@ export declare const enum StorageKeys {
5
5
  ze_auth_token = "ze-auth-token",
6
6
  ze_secret_token = "ZE_SECRET_TOKEN",
7
7
  ze_fs_cache = "ze-fs-cache",
8
- ze_hash_cache = "ze-hash-cache"
8
+ ze_hash_cache = "ze-hash-cache",
9
+ ze_app_deploy_result = "ze-app-deploy-result"
9
10
  }
@@ -6,6 +6,7 @@ const node_persist_1 = require("node-persist");
6
6
  const node_os_1 = require("node:os");
7
7
  const node_path_1 = require("node:path");
8
8
  const storage_keys_1 = require("./storage-keys");
9
+ const secret_token_1 = require("./secret-token");
9
10
  const storage = (0, node_persist_1.init)({
10
11
  dir: (0, node_path_1.join)((0, node_os_1.homedir)(), storage_keys_1.ZE_PATH),
11
12
  });
@@ -18,6 +19,10 @@ function saveToken(token) {
18
19
  exports.saveToken = saveToken;
19
20
  function getToken() {
20
21
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
22
+ const tokenFromEnv = yield (0, secret_token_1.getSecretToken)();
23
+ if (tokenFromEnv) {
24
+ return tokenFromEnv;
25
+ }
21
26
  yield storage;
22
27
  return (0, node_persist_1.getItem)("ze-auth-token" /* StorageKeys.ze_auth_token */);
23
28
  });
@@ -1 +1 @@
1
- {"version":3,"file":"token.js","sourceRoot":"","sources":["../../../src/lib/node-persist/token.ts"],"names":[],"mappings":";;;;AAAA,+CAAyE;AACzE,qCAAkC;AAClC,yCAAiC;AACjC,iDAAsD;AAEtD,MAAM,OAAO,GAAG,IAAA,mBAAI,EAAC;IACnB,GAAG,EAAE,IAAA,gBAAI,EAAC,IAAA,iBAAO,GAAE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,SAAsB,WAAW;;QAC/B,MAAM,OAAO,CAAC;QACd,MAAM,IAAA,yBAAU,kDAA2B,CAAC;IAC9C,CAAC;CAAA;AAHD,kCAGC;AAED,SAAsB,WAAW;;QAC/B,MAAM,OAAO,CAAC;QACd,MAAM,IAAA,oBAAK,GAAE,CAAC;IAChB,CAAC;CAAA;AAHD,kCAGC"}
@@ -0,0 +1,18 @@
1
+ export interface UploadProviderConfig {
2
+ type: UploadProviderType;
3
+ providerConfig: IntegrationConfig;
4
+ }
5
+ export declare enum UploadProviderType {
6
+ CLOUDFLARE = "cloudflare",
7
+ AWS = "aws",
8
+ NETLIFY = "netlify",
9
+ AZURE = "azure",
10
+ GCP = "gcp"
11
+ }
12
+ export interface CloudflareOptions {
13
+ edgeUrl: string;
14
+ api_token: string;
15
+ accountId: string;
16
+ projectName?: string;
17
+ }
18
+ export type IntegrationConfig = CloudflareOptions;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UploadProviderType = void 0;
4
+ var UploadProviderType;
5
+ (function (UploadProviderType) {
6
+ UploadProviderType["CLOUDFLARE"] = "cloudflare";
7
+ UploadProviderType["AWS"] = "aws";
8
+ UploadProviderType["NETLIFY"] = "netlify";
9
+ UploadProviderType["AZURE"] = "azure";
10
+ UploadProviderType["GCP"] = "gcp";
11
+ })(UploadProviderType || (exports.UploadProviderType = UploadProviderType = {}));
12
+ //# sourceMappingURL=upload-provider-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload-provider-options.js","sourceRoot":"","sources":["../../../src/lib/node-persist/upload-provider-options.ts"],"names":[],"mappings":";;;AAKA,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,+CAAyB,CAAA;IACzB,iCAAW,CAAA;IACX,yCAAmB,CAAA;IACnB,qCAAe,CAAA;IACf,iCAAW,CAAA;AACb,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B"}
@@ -29,4 +29,5 @@ export interface ZephyrPluginOptions {
29
29
  shared?: Record<string, unknown>;
30
30
  };
31
31
  wait_for_index_html?: boolean;
32
+ outputPath?: string;
32
33
  }
@@ -35,3 +35,6 @@ export interface SnapshotAsset {
35
35
  hash: string;
36
36
  size: number;
37
37
  }
38
+ export interface SnapshotMetadata {
39
+ pages_url?: string;
40
+ }
@@ -0,0 +1 @@
1
+ export declare const is_debug_enabled: boolean;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.is_debug_enabled = void 0;
5
+ const tslib_1 = require("tslib");
6
+ const process = tslib_1.__importStar(require("node:process"));
7
+ const _zephyr_debug = (_a = process.env['DEBUG']) === null || _a === void 0 ? void 0 : _a.indexOf('zephyr');
8
+ exports.is_debug_enabled = typeof _zephyr_debug === 'number' && _zephyr_debug !== -1;
9
+ //# sourceMappingURL=debug-enabled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug-enabled.js","sourceRoot":"","sources":["../../../src/lib/utils/debug-enabled.ts"],"names":[],"mappings":";;;;;AAAA,8DAAwC;AAExC,MAAM,aAAa,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,0CAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEjD,QAAA,gBAAgB,GAC3B,OAAO,aAAa,KAAK,QAAQ,IAAI,aAAa,KAAK,CAAC,CAAC,CAAC"}
@@ -1,4 +1,7 @@
1
- export declare const is_debug_enabled: boolean;
1
+ export declare const dimmedName: string;
2
+ export declare const brightBlueBgName: string;
3
+ export declare const brightYellowBgName: string;
4
+ export declare const brightRedBgName: string;
2
5
  export declare const ze_log: import("debug").Debugger;
3
6
  export declare const ze_error: {
4
7
  (...data: any[]): void;
@@ -1,16 +1,21 @@
1
1
  "use strict";
2
- var _a;
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ze_error = exports.ze_log = exports.is_debug_enabled = void 0;
5
- const tslib_1 = require("tslib");
3
+ exports.ze_error = exports.ze_log = exports.brightRedBgName = exports.brightYellowBgName = exports.brightBlueBgName = exports.dimmedName = void 0;
4
+ // light weight utils for decorated console.error + able to toggle different parts of whole module's logging result
6
5
  const debug_1 = require("debug");
7
- const process = tslib_1.__importStar(require("node:process"));
8
- const name = 'zephyr';
9
- const _zephyr_debug = (_a = process.env['DEBUG']) === null || _a === void 0 ? void 0 : _a.indexOf('zephyr');
10
- exports.is_debug_enabled = typeof _zephyr_debug === 'number'
11
- && _zephyr_debug !== -1;
12
- exports.ze_log = (0, debug_1.debug)(`${name}:log`);
13
- exports.ze_error = exports.is_debug_enabled
14
- ? (0, debug_1.debug)(`${name}:error`)
6
+ const picocolor_1 = require("./picocolor");
7
+ const debug_enabled_1 = require("./debug-enabled");
8
+ //TODO: this should be traced and logged into new relic
9
+ //TODO: print different colors to it + Capitalize maybe?
10
+ const name = ' ZEPHYR ';
11
+ exports.dimmedName = (0, picocolor_1.dim)(name);
12
+ exports.brightBlueBgName = (0, picocolor_1.bold)((0, picocolor_1.bgCyanBright)((0, picocolor_1.black)(name)));
13
+ exports.brightYellowBgName = (0, picocolor_1.bold)((0, picocolor_1.bgYellowBright)((0, picocolor_1.black)(name)));
14
+ exports.brightRedBgName = (0, picocolor_1.bold)((0, picocolor_1.bgRedBright)((0, picocolor_1.black)(name)));
15
+ exports.ze_log = (0, debug_1.debug)('zephyr:log');
16
+ // If debug mode is not enabled just print whatever console output is
17
+ // If debug mode is enabled print the error from our end
18
+ exports.ze_error = debug_enabled_1.is_debug_enabled
19
+ ? (0, debug_1.debug)('zephyr:error')
15
20
  : console.error.bind(console);
16
21
  //# sourceMappingURL=debug.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"debug.js","sourceRoot":"","sources":["../../../src/lib/utils/debug.ts"],"names":[],"mappings":";;;;;AAAA,iCAA8B;AAC9B,8DAAwC;AAExC,MAAM,IAAI,GAAG,QAAQ,CAAC;AACtB,MAAM,aAAa,GAAG,MAAA,OAAO,CAA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AAO,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ export declare const docsPrefix = "https://docs.zephyr-cloud.io/guide/error";
2
+ export type Prefix = 'ZE';
3
+ export type BuildErrorCode = `${Prefix}100${number}`;
4
+ export type DeployErrorCode = `${Prefix}200${number}`;
5
+ export type RuntimeErrorCode = `${Prefix}300${number}`;
6
+ type BuildErrorMessageType = {
7
+ [T in BuildErrorCode]: string;
8
+ };
9
+ /**
10
+ * A collection of error types and the error code during local/build stage*/
11
+ export declare const buildErrorMessages: BuildErrorMessageType;
12
+ export type DeployErrorMessageType = {
13
+ [T in DeployErrorCode]: string;
14
+ };
15
+ /** Happens when users are able to "deploy" -> there'd be edge url show up in their terminal. but when they click on that link it will show them this error. */
16
+ export declare const deployErrorMessages: DeployErrorMessageType;
17
+ export type RuntimeErrorMessageType = {
18
+ [T in RuntimeErrorCode]: string;
19
+ };
20
+ export declare const runtimeErrorMessages: RuntimeErrorMessageType;
21
+ export type ErrorMessageMap = {
22
+ buildErrorMessages: BuildErrorMessageType;
23
+ deployErrorMessages: DeployErrorMessageType;
24
+ runtimeErrorMessages: RuntimeErrorMessageType;
25
+ };
26
+ export declare const errorMessages: ErrorMessageMap;
27
+ export {};
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.errorMessages = exports.runtimeErrorMessages = exports.deployErrorMessages = exports.buildErrorMessages = exports.docsPrefix = void 0;
4
+ // ! If anyone is adding new errors to this file please make sure the description and debugging for users are sync with documentation's error page
5
+ exports.docsPrefix = 'https://docs.zephyr-cloud.io/guide/error';
6
+ /**
7
+ * A collection of error types and the error code during local/build stage*/
8
+ exports.buildErrorMessages = {
9
+ /** package.json not found error */
10
+ ZE10010: 'Package.json not found',
11
+ /** Package.json is not in a valid json format*/
12
+ ZE10011: 'Package.json is not in a valid json format.',
13
+ /** Webpack config error*/
14
+ ZE10012: 'Webpack config error.', // TODO: we don't detect this error yet, will we be able to separate them?
15
+ /** Package.json must have a name and version field. */
16
+ ZE10013: 'Package.json must have a name and version field.',
17
+ /** Git remote origin is not configured properly.*/
18
+ ZE10014: 'Git remote origin is not configured properly.',
19
+ /** Git username or email is not configured. */
20
+ ZE10015: 'Git username or email is not configured.',
21
+ /** Could not get git info */
22
+ ZE10016: 'Could not get git info.',
23
+ /** application_uid missing. */
24
+ ZE10017: '`application_uid` missing.',
25
+ /** Auth error */
26
+ ZE10018: 'Auth error.',
27
+ /** Could not get build id. */
28
+ ZE10019: 'Could not get build id.',
29
+ /**Could not initialize Zephyr Agent. */
30
+ ZE10020: 'Could not initialize Zephyr Agent.',
31
+ /**Failed to get application hash list. */
32
+ ZE10021: 'Failed to get application hash list.',
33
+ };
34
+ /** Happens when users are able to "deploy" -> there'd be edge url show up in their terminal. but when they click on that link it will show them this error. */
35
+ exports.deployErrorMessages = {
36
+ /** Assets not found. */
37
+ ZE20010: 'Assets not found.',
38
+ /** Assets not found in snapshot. */
39
+ ZE20011: 'Assets not found in snapshot.',
40
+ /** `application_uid` is required. */
41
+ ZE20012: '`application_uid` is required.',
42
+ /** Missing file hash */
43
+ ZE20013: 'Missing file hash.',
44
+ /** Failed to load application configuration. */
45
+ ZE20014: 'Failed to load application configuration.',
46
+ /**Failed to upload build stats. */
47
+ ZE20015: 'Failed to upload build stats.',
48
+ /** Did not receive envs from build stats upload */
49
+ ZE20016: 'Did not receive envs from build stats upload.',
50
+ /** Failed to upload assets. */
51
+ ZE20017: 'Failed to upload assets.',
52
+ /** Failed to upload snapshots. */
53
+ ZE20018: 'Failed to upload snapshots.',
54
+ /** Snapshot uploads gave no results. */
55
+ ZE20019: 'Snapshot uploads gave no results.',
56
+ /**Failed to get application hash list */
57
+ ZE20020: 'Failed to get application hash list.',
58
+ /** Could not resolve ${name} with verson ${version} */
59
+ ZE20021: 'Could not resolve application name with version.',
60
+ /** Could not get build id */
61
+ ZE20022: 'Could not get build id.',
62
+ };
63
+ exports.runtimeErrorMessages = {};
64
+ exports.errorMessages = {
65
+ buildErrorMessages: exports.buildErrorMessages,
66
+ deployErrorMessages: exports.deployErrorMessages,
67
+ runtimeErrorMessages: exports.runtimeErrorMessages,
68
+ };
69
+ //# sourceMappingURL=error-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-types.js","sourceRoot":"","sources":["../../../src/lib/utils/error-types.ts"],"names":[],"mappings":";;;AAAA,kJAAkJ;AACrI,QAAA,UAAU,GAAG,0CAA0C,CAAC;AAWrE;4EAC4E;AAC/D,QAAA,kBAAkB,GAA0B;IACvD,mCAAmC;IACnC,OAAO,EAAE,wBAAwB;IACjC,gDAAgD;IAChD,OAAO,EAAE,6CAA6C;IACtD,0BAA0B;IAC1B,OAAO,EAAE,uBAAuB,EAAE,0EAA0E;IAC5G,uDAAuD;IACvD,OAAO,EAAE,kDAAkD;IAC3D,mDAAmD;IACnD,OAAO,EAAE,+CAA+C;IACxD,+CAA+C;IAC/C,OAAO,EAAE,0CAA0C;IACnD,6BAA6B;IAC7B,OAAO,EAAE,yBAAyB;IAClC,+BAA+B;IAC/B,OAAO,EAAE,4BAA4B;IACrC,iBAAiB;IACjB,OAAO,EAAE,aAAa;IACtB,8BAA8B;IAC9B,OAAO,EAAE,yBAAyB;IAClC,wCAAwC;IACxC,OAAO,EAAE,oCAAoC;IAC7C,0CAA0C;IAC1C,OAAO,EAAE,sCAAsC;CAChD,CAAC;AAMF,+JAA+J;AAClJ,QAAA,mBAAmB,GAA2B;IACzD,wBAAwB;IACxB,OAAO,EAAE,mBAAmB;IAC5B,oCAAoC;IACpC,OAAO,EAAE,+BAA+B;IACxC,qCAAqC;IACrC,OAAO,EAAE,gCAAgC;IACzC,wBAAwB;IACxB,OAAO,EAAE,oBAAoB;IAC7B,gDAAgD;IAChD,OAAO,EAAE,2CAA2C;IACpD,mCAAmC;IACnC,OAAO,EAAE,+BAA+B;IACxC,mDAAmD;IACnD,OAAO,EAAE,+CAA+C;IACxD,+BAA+B;IAC/B,OAAO,EAAE,0BAA0B;IACnC,kCAAkC;IAClC,OAAO,EAAE,6BAA6B;IACtC,wCAAwC;IACxC,OAAO,EAAE,mCAAmC;IAC5C,yCAAyC;IACzC,OAAO,EAAE,sCAAsC;IAC/C,uDAAuD;IACvD,OAAO,EAAE,kDAAkD;IAC3D,6BAA6B;IAC7B,OAAO,EAAE,yBAAyB;CACnC,CAAC;AAMW,QAAA,oBAAoB,GAA4B,EAAE,CAAC;AAQnD,QAAA,aAAa,GAAoB;IAC5C,kBAAkB,EAAlB,0BAAkB;IAClB,mBAAmB,EAAnB,2BAAmB;IACnB,oBAAoB,EAApB,4BAAoB;CACrB,CAAC"}
@@ -0,0 +1,42 @@
1
+ export declare const reset: (s: string) => string;
2
+ export declare const bold: (input: string) => string;
3
+ export declare const dim: (input: string) => string;
4
+ export declare const italic: (input: string) => string;
5
+ export declare const underline: (input: string) => string;
6
+ export declare const inverse: (input: string) => string;
7
+ export declare const hidden: (input: string) => string;
8
+ export declare const strikethrough: (input: string) => string;
9
+ export declare const black: (input: string) => string;
10
+ export declare const red: (input: string) => string;
11
+ export declare const green: (input: string) => string;
12
+ export declare const yellow: (input: string) => string;
13
+ export declare const blue: (input: string) => string;
14
+ export declare const magenta: (input: string) => string;
15
+ export declare const purple: (input: string) => string;
16
+ export declare const cyan: (input: string) => string;
17
+ export declare const white: (input: string) => string;
18
+ export declare const gray: (input: string) => string;
19
+ export declare const bgBlack: (input: string) => string;
20
+ export declare const bgRed: (input: string) => string;
21
+ export declare const bgGreen: (input: string) => string;
22
+ export declare const bgYellow: (input: string) => string;
23
+ export declare const bgBlue: (input: string) => string;
24
+ export declare const bgMagenta: (input: string) => string;
25
+ export declare const bgCyan: (input: string) => string;
26
+ export declare const bgWhite: (input: string) => string;
27
+ export declare const blackBright: (input: string) => string;
28
+ export declare const redBright: (input: string) => string;
29
+ export declare const greenBright: (input: string) => string;
30
+ export declare const yellowBright: (input: string) => string;
31
+ export declare const blueBright: (input: string) => string;
32
+ export declare const magentaBright: (input: string) => string;
33
+ export declare const cyanBright: (input: string) => string;
34
+ export declare const whiteBright: (input: string) => string;
35
+ export declare const bgBlackBright: (input: string) => string;
36
+ export declare const bgRedBright: (input: string) => string;
37
+ export declare const bgGreenBright: (input: string) => string;
38
+ export declare const bgYellowBright: (input: string) => string;
39
+ export declare const bgBlueBright: (input: string) => string;
40
+ export declare const bgMagentaBright: (input: string) => string;
41
+ export declare const bgCyanBright: (input: string) => string;
42
+ export declare const bgWhiteBright: (input: string) => string;
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ // ISC License
3
+ var _a;
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.bgWhiteBright = exports.bgCyanBright = exports.bgMagentaBright = exports.bgBlueBright = exports.bgYellowBright = exports.bgGreenBright = exports.bgRedBright = exports.bgBlackBright = exports.whiteBright = exports.cyanBright = exports.magentaBright = exports.blueBright = exports.yellowBright = exports.greenBright = exports.redBright = exports.blackBright = exports.bgWhite = exports.bgCyan = exports.bgMagenta = exports.bgBlue = exports.bgYellow = exports.bgGreen = exports.bgRed = exports.bgBlack = exports.gray = exports.white = exports.cyan = exports.purple = exports.magenta = exports.blue = exports.yellow = exports.green = exports.red = exports.black = exports.strikethrough = exports.hidden = exports.inverse = exports.underline = exports.italic = exports.dim = exports.bold = exports.reset = void 0;
6
+ // Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov
7
+ // Permission to use, copy, modify, and/or distribute this software for any
8
+ // purpose with or without fee is hereby granted, provided that the above
9
+ // copyright notice and this permission notice appear in all copies.
10
+ // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
+ // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
+ // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
+ // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+ //
18
+ // https://github.com/alexeyraspopov/picocolors/blob/b6261487e7b81aaab2440e397a356732cad9e342/picocolors.js#L1
19
+ const debug_enabled_1 = require("./debug-enabled");
20
+ const { env, stdout } = (_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.process) !== null && _a !== void 0 ? _a : {};
21
+ const enabled = !debug_enabled_1.is_debug_enabled &&
22
+ env &&
23
+ !env['NO_COLOR'] &&
24
+ (env['FORCE_COLOR'] ||
25
+ ((stdout === null || stdout === void 0 ? void 0 : stdout.isTTY) && !env['CI'] && env['TERM'] !== 'dumb'));
26
+ // const enabled = env
27
+ const replaceClose = (str, close, replace, index) => {
28
+ const start = str.substring(0, index) + replace;
29
+ const end = str.substring(index + close.length);
30
+ const nextIndex = end.indexOf(close);
31
+ return ~nextIndex
32
+ ? start + replaceClose(end, close, replace, nextIndex)
33
+ : start + end;
34
+ };
35
+ const formatter = (open, close, replace = open) => {
36
+ if (!enabled)
37
+ return String;
38
+ return (input) => {
39
+ const string = '' + input;
40
+ const index = string.indexOf(close, open.length);
41
+ return ~index
42
+ ? open + replaceClose(string, close, replace, index) + close
43
+ : open + string + close;
44
+ };
45
+ };
46
+ // text styles
47
+ exports.reset = enabled ? (s) => `\x1b[0m${s}\x1b[0m` : String;
48
+ exports.bold = formatter('\x1b[1m', '\x1b[22m', '\x1b[22m\x1b[1m');
49
+ exports.dim = formatter('\x1b[2m', '\x1b[22m', '\x1b[22m\x1b[2m');
50
+ exports.italic = formatter('\x1b[3m', '\x1b[23m');
51
+ exports.underline = formatter('\x1b[4m', '\x1b[24m');
52
+ exports.inverse = formatter('\x1b[7m', '\x1b[27m');
53
+ exports.hidden = formatter('\x1b[8m', '\x1b[28m');
54
+ exports.strikethrough = formatter('\x1b[9m', '\x1b[29m');
55
+ // text colors
56
+ exports.black = formatter('\x1b[30m', '\x1b[39m');
57
+ exports.red = formatter('\x1b[31m', '\x1b[39m');
58
+ exports.green = formatter('\x1b[32m', '\x1b[39m');
59
+ exports.yellow = formatter('\x1b[33m', '\x1b[39m');
60
+ exports.blue = formatter('\x1b[34m', '\x1b[39m');
61
+ exports.magenta = formatter('\x1b[35m', '\x1b[39m');
62
+ exports.purple = formatter('\x1b[38;2;173;127;168m', '\x1b[39m');
63
+ exports.cyan = formatter('\x1b[36m', '\x1b[39m');
64
+ exports.white = formatter('\x1b[37m', '\x1b[39m');
65
+ exports.gray = formatter('\x1b[90m', '\x1b[39m');
66
+ // background colors
67
+ exports.bgBlack = formatter('\x1b[40m', '\x1b[49m');
68
+ exports.bgRed = formatter('\x1b[41m', '\x1b[49m');
69
+ exports.bgGreen = formatter('\x1b[42m', '\x1b[49m');
70
+ exports.bgYellow = formatter('\x1b[43m', '\x1b[49m');
71
+ exports.bgBlue = formatter('\x1b[44m', '\x1b[49m');
72
+ exports.bgMagenta = formatter('\x1b[45m', '\x1b[49m');
73
+ exports.bgCyan = formatter('\x1b[46m', '\x1b[49m');
74
+ exports.bgWhite = formatter('\x1b[47m', '\x1b[49m');
75
+ // special text colors
76
+ exports.blackBright = formatter('\x1b[90m', '\x1b[39m');
77
+ exports.redBright = formatter('\x1b[91m', '\x1b[39m');
78
+ exports.greenBright = formatter('\x1b[92m', '\x1b[39m');
79
+ exports.yellowBright = formatter('\x1b[93m', '\x1b[39m');
80
+ exports.blueBright = formatter('\x1b[94m', '\x1b[39m');
81
+ exports.magentaBright = formatter('\x1b[95m', '\x1b[39m');
82
+ exports.cyanBright = formatter('\x1b[96m', '\x1b[39m');
83
+ exports.whiteBright = formatter('\x1b[97m', '\x1b[39m');
84
+ // special background colors
85
+ exports.bgBlackBright = formatter('\x1b[100m', '\x1b[49m');
86
+ exports.bgRedBright = formatter('\x1b[101m', '\x1b[49m');
87
+ exports.bgGreenBright = formatter('\x1b[102m', '\x1b[49m');
88
+ exports.bgYellowBright = formatter('\x1b[103m', '\x1b[49m');
89
+ exports.bgBlueBright = formatter('\x1b[104m', '\x1b[49m');
90
+ exports.bgMagentaBright = formatter('\x1b[105m', '\x1b[49m');
91
+ exports.bgCyanBright = formatter('\x1b[106m', '\x1b[49m');
92
+ exports.bgWhiteBright = formatter('\x1b[107m', '\x1b[49m');
93
+ //# sourceMappingURL=picocolor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"picocolor.js","sourceRoot":"","sources":["../../../src/lib/utils/picocolor.ts"],"names":[],"mappings":";AAAA,cAAc;;;;AAEd,wEAAwE;AAExE,2EAA2E;AAC3E,yEAAyE;AACzE,oEAAoE;AAEpE,2EAA2E;AAC3E,mEAAmE;AACnE,0EAA0E;AAC1E,yEAAyE;AACzE,wEAAwE;AACxE,0EAA0E;AAC1E,iEAAiE;AACjE,EAAE;AACF,8GAA8G;AAE9G,mDAAmD;AAEnD,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,mCAAI,EAAE,CAAC;AAElD,MAAM,OAAO,GACX,CAAC,gCAAgB;IACjB,GAAG;IACH,CAAC,GAAG,CAAC,UAAU,CAAC;IAChB,CAAC,GAAG,CAAC,aAAa,CAAC;QACjB,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,KAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;AAE7D,sBAAsB;AAEtB,MAAM,YAAY,GAAG,CACnB,GAAW,EACX,KAAa,EACb,OAAe,EACf,KAAa,EACL,EAAE;IACV,MAAM,KAAK,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC;IAChD,MAAM,GAAG,GAAG,GAAG,CAAC,SAAS,CA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U,CAAC,CAAC;AAClD,QAAA,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC"}
@@ -7,6 +7,8 @@ const https = tslib_1.__importStar(require("node:https"));
7
7
  const debug_1 = require("./debug");
8
8
  const token_1 = require("../node-persist/token");
9
9
  const safe_json_parse_1 = require("./safe-json-parse");
10
+ const debug_2 = require("./debug");
11
+ const picocolor_1 = require("./picocolor");
10
12
  function _redact(str) {
11
13
  if (!str)
12
14
  return '';
@@ -23,7 +25,7 @@ function request(url, options, data) {
23
25
  const req = _https.request(url, options !== null && options !== void 0 ? options : {}, (res) => tslib_1.__awaiter(this, void 0, void 0, function* () {
24
26
  if (res.statusCode === 401 || res.statusCode === 403) {
25
27
  yield (0, token_1.cleanTokens)();
26
- const err = new Error('[zephyr]: auth error, please try to build again');
28
+ const err = new Error(`${debug_2.brightRedBgName} ${(0, picocolor_1.red)(`Error [ZE10018]: auth error, please sign in to https://app.zephyr-cloud.io then try to build again. See documentation https://docs.zephyr-cloud.io/guide/error/bu10018`)}`);
27
29
  err.stack = void 0;
28
30
  throw err;
29
31
  }
@@ -44,7 +46,7 @@ function request(url, options, data) {
44
46
  if ((typeof res.statusCode === 'number' && res.statusCode > 299) ||
45
47
  (typeof (parsed_response === null || parsed_response === void 0 ? void 0 : parsed_response.status) === 'number' &&
46
48
  (parsed_response === null || parsed_response === void 0 ? void 0 : parsed_response.status) > 299)) {
47
- return reject(`[zephyr]: Error from ${url}: \n ${(_c = parsed_response === null || parsed_response === void 0 ? void 0 : parsed_response.message) !== null && _c !== void 0 ? _c : _response}`);
49
+ return reject(`${debug_2.brightRedBgName} Error from ${url}: \n ${(_c = parsed_response === null || parsed_response === void 0 ? void 0 : parsed_response.message) !== null && _c !== void 0 ? _c : _response}`);
48
50
  }
49
51
  if (url.pathname.indexOf('application/logs') === -1)
50
52
  (0, debug_1.ze_log)(message);
@@ -52,7 +54,7 @@ function request(url, options, data) {
52
54
  });
53
55
  }));
54
56
  req.on('error', (e) => {
55
- (0, debug_1.ze_error)(`[${(options === null || options === void 0 ? void 0 : options.method) || 'GET'}][${url}]: ${Date.now() - req_start}ms \n ${_options_str}`, e);
57
+ (0, debug_1.ze_error)('', `[${(options === null || options === void 0 ? void 0 : options.method) || 'GET'}][${url}]: ${Date.now() - req_start}ms \n ${_options_str} \n ${e}`);
56
58
  reject(e);
57
59
  });
58
60
  if (data) {
@@ -1 +1 @@
1
- {"version":3,"file":"ze-http-request.js","sourceRoot":"","sources":["../../../src/lib/utils/ze-http-request.ts"],"names":[],"mappings":";;;;AACA,wDAAkC;AAClC,0DAAoC;AACpC,mCAA2C;AAC3C,iDAAoD;AACpD,uDAAoD;AAEpD,SAAS,OAAO,CAAC,GAAuB;IACtC,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IACpB,OAAO,GAAG;SACP,OAAO,CAAC,oBAAoB,EAAE,mBAAmB,CAAC;SAClD,OAAO,CAAC,wCAAwC,EAAE,iBAAiB,CAAC,CAAC;AAC1E,CAAC;AAED,SAAsB,OAAO,CAC3B,GAAQ,EACR,OAA2B,EAC3B,IAA+C;;QAE/C,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;QACxD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YAC7B,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;YAEtD,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CACxB,GAAG,EACH,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,CAAO,GAAyB,EAAE,EAAE;gBAClC,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC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wBACD,OAAO,MAAM,CACX,GAAG,uBAAe,eAAe,GAAG,QAAQ,MAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,OAAO,mCAAI,SAAS,EAAE,CACpF,CAAC;oBACJ,CAAC;oBAED,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;wBAAE,IAAA,cAAM,EAAC,OAAO,CAAC,CAAC;oBAErE,OAAO,CAAC,MAAC,eAAqB,mCAAK,SAAoB,CAAC,CAAC;gBAC3D,CAAC,CAAC,CAAC;YACL,CAAC,CAAA,CACF,CAAC;YAEF,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAU,EAAE,EAAE;gBAC7B,IAAA,gBAAQ,EACN,EAAE,EACF,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,KAAI,KAAK,KAAK,GAAG,MAAM,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,SAAS,YAAY,OAAO,CAAC,EAAE,CAChG,CAAC;gBACF,MAAM,CAAC,CAAC,CAAC,CAAC;YACZ,CAAC,CAAC,CAAC;YAEH,IAAI,IAAI,EAAE,CAAC;gBACT,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAClB,CAAC;YAED,GAAG,CAAC,GAAG,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC;CAAA;AAzED,0BAyEC"}
@@ -0,0 +1,80 @@
1
+ export interface ZephyrBuildStats {
2
+ project: string;
3
+ id: string;
4
+ name: string;
5
+ version: string;
6
+ environment: string;
7
+ posted?: Date;
8
+ remote: string | undefined;
9
+ metadata: unknown;
10
+ overrides: ApplicationOverride[];
11
+ consumes: ApplicationConsumes[];
12
+ modules: ApplicationModule[];
13
+ tags: string[];
14
+ dependencies?: RawDependency[];
15
+ optionalDependencies?: RawDependency[];
16
+ peerDependencies?: RawDependency[];
17
+ devDependencies?: RawDependency[];
18
+ default?: boolean;
19
+ remotes?: string[];
20
+ app: {
21
+ name: string;
22
+ version: string;
23
+ org: string;
24
+ project: string;
25
+ buildId: number;
26
+ };
27
+ git: {
28
+ name: string;
29
+ email: string;
30
+ branch: string;
31
+ commit: string;
32
+ };
33
+ context: {
34
+ username: string;
35
+ isCI: boolean;
36
+ };
37
+ edge: {
38
+ url: string;
39
+ versionUrl?: string;
40
+ };
41
+ domain?: string | undefined;
42
+ platform?: DeploymentIntegrationPlatform | undefined;
43
+ type: unknown;
44
+ }
45
+ declare enum DeploymentIntegrationPlatform {
46
+ CLOUDFLARE = "cloudflare",
47
+ AWS = "aws",
48
+ NETLIFY = "netlify",
49
+ AZURE = "azure",
50
+ GCP = "gcp"
51
+ }
52
+ export interface RawDependency {
53
+ name: string;
54
+ version: string;
55
+ }
56
+ export interface ApplicationModule {
57
+ id: string;
58
+ name: string;
59
+ applicationID: string;
60
+ requires: string[];
61
+ file: string;
62
+ }
63
+ export interface ApplicationOverride {
64
+ id: string;
65
+ name: string;
66
+ version: string;
67
+ location: string;
68
+ applicationID: string;
69
+ }
70
+ export interface ApplicationConsumes {
71
+ consumingApplicationID: string;
72
+ applicationID: string;
73
+ name: string;
74
+ usedIn: UsedIn[];
75
+ }
76
+ export interface UsedIn {
77
+ file: string;
78
+ url: string;
79
+ }
80
+ export {};
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var DeploymentIntegrationPlatform;
4
+ (function (DeploymentIntegrationPlatform) {
5
+ DeploymentIntegrationPlatform["CLOUDFLARE"] = "cloudflare";
6
+ DeploymentIntegrationPlatform["AWS"] = "aws";
7
+ DeploymentIntegrationPlatform["NETLIFY"] = "netlify";
8
+ DeploymentIntegrationPlatform["AZURE"] = "azure";
9
+ DeploymentIntegrationPlatform["GCP"] = "gcp";
10
+ })(DeploymentIntegrationPlatform || (DeploymentIntegrationPlatform = {}));
11
+ //# sourceMappingURL=zephyr-build-stats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zephyr-build-stats.js","sourceRoot":"","sources":["../../src/lib/zephyr-build-stats.ts"],"names":[],"mappings":";;AAgDA,IAAK,6BAMJ;AAND,WAAK,6BAA6B;IAChC,0DAAyB,CAAA;IACzB,4CAAW,CAAA;IACX,oDAAmB,CAAA;IACnB,gDAAe,CAAA;IACf,4CAAW,CAAA;AACb,CAAC,EANI,6BAA6B,KAA7B,6BAA6B,QAMjC"}
@@ -93,6 +93,9 @@ export interface ZeBuildAssetsMap {
93
93
  [key: string]: ZeBuildAsset;
94
94
  }
95
95
  export interface SnapshotUploadRes {
96
+ urls: {
97
+ version: string;
98
+ };
96
99
  assets: ZeBuildAsset[];
97
100
  assets_v2?: ZeBuildAsset[];
98
101
  asset_time?: number;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-edge-contract",
3
- "version": "0.0.12",
3
+ "version": "0.0.15",
4
4
  "license": "Apache-2.0",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-edge-contract",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "license": "Apache-2.0",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",
package/.eslintrc.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "extends": ["../../.eslintrc.json"],
3
- "ignorePatterns": ["!**/*"],
4
- "overrides": [
5
- {
6
- "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7
- "rules": {}
8
- },
9
- {
10
- "files": ["*.ts", "*.tsx"],
11
- "rules": {}
12
- },
13
- {
14
- "files": ["*.js", "*.jsx"],
15
- "rules": {}
16
- },
17
- {
18
- "files": ["*.json"],
19
- "parser": "jsonc-eslint-parser",
20
- "rules": {
21
- "@nx/dependency-checks": "error"
22
- }
23
- }
24
- ]
25
- }
package/jest.config.ts DELETED
@@ -1,11 +0,0 @@
1
- /* eslint-disable */
2
- export default {
3
- displayName: 'zephyr-edge-contract',
4
- preset: '../../jest.preset.js',
5
- testEnvironment: 'node',
6
- transform: {
7
- '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
8
- },
9
- moduleFileExtensions: ['ts', 'js', 'html'],
10
- coverageDirectory: '../../coverage/libs/zephyr-edge-contract',
11
- };
package/project.json DELETED
@@ -1,34 +0,0 @@
1
- {
2
- "name": "zephyr-edge-contract",
3
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "libs/zephyr-edge-contract/src",
5
- "projectType": "library",
6
- "targets": {
7
- "build": {
8
- "executor": "@nx/js:tsc",
9
- "outputs": ["{options.outputPath}"],
10
- "options": {
11
- "rootDir": "libs/zephyr-edge-contract/src",
12
- "outputPath": "libs/zephyr-edge-contract/dist",
13
- "main": "libs/zephyr-edge-contract/src/index.ts",
14
- "tsConfig": "libs/zephyr-edge-contract/tsconfig.lib.json"
15
- }
16
- },
17
- "publish": {
18
- "command": "node tools/scripts/publish.mjs zephyr-edge-contract {args.ver} {args.tag}",
19
- "dependsOn": ["build"]
20
- },
21
- "lint": {
22
- "executor": "@nx/eslint:lint",
23
- "outputs": ["{options.outputFile}"]
24
- },
25
- "test": {
26
- "executor": "@nx/jest:jest",
27
- "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
28
- "options": {
29
- "jestConfig": "libs/zephyr-edge-contract/jest.config.ts"
30
- }
31
- }
32
- },
33
- "tags": []
34
- }
package/tsconfig.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "module": "commonjs",
5
- "forceConsistentCasingInFileNames": true,
6
- "strict": true,
7
- "noImplicitOverride": true,
8
- "noPropertyAccessFromIndexSignature": true,
9
- "noImplicitReturns": true,
10
- "noFallthroughCasesInSwitch": true,
11
- "esModuleInterop": true
12
- },
13
- "files": [],
14
- "include": [],
15
- "references": [
16
- {
17
- "path": "./tsconfig.lib.json"
18
- },
19
- {
20
- "path": "./tsconfig.spec.json"
21
- }
22
- ]
23
- }
package/tsconfig.lib.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../dist/out-tsc",
5
- "declaration": true,
6
- "types": ["node"]
7
- },
8
- "include": ["src/**/*.ts"],
9
- "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
10
- }
@@ -1,14 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../dist/out-tsc",
5
- "module": "commonjs",
6
- "types": ["jest", "node"]
7
- },
8
- "include": [
9
- "jest.config.ts",
10
- "src/**/*.test.ts",
11
- "src/**/*.spec.ts",
12
- "src/**/*.d.ts"
13
- ]
14
- }