zephyr-edge-contract 0.0.14 → 0.0.16

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 (45) hide show
  1. package/dist/index.d.ts +11 -6
  2. package/dist/index.js +6 -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.js +1 -1
  14. package/dist/lib/node-persist/application-configuration.js.map +1 -1
  15. package/dist/lib/node-persist/hash-cache.js.map +1 -1
  16. package/dist/lib/node-persist/storage-keys.d.ts +2 -1
  17. package/dist/lib/node-persist/token.js +5 -0
  18. package/dist/lib/node-persist/token.js.map +1 -1
  19. package/dist/lib/plugin-options/zephyr-plugin-options.d.ts +3 -3
  20. package/dist/lib/utils/create-snapshot-id.d.ts +1 -1
  21. package/dist/lib/utils/debug-enabled.d.ts +1 -0
  22. package/dist/lib/utils/debug-enabled.js +9 -0
  23. package/dist/lib/utils/debug-enabled.js.map +1 -0
  24. package/dist/lib/utils/debug.d.ts +11 -23
  25. package/dist/lib/utils/debug.js +21 -56
  26. package/dist/lib/utils/debug.js.map +1 -1
  27. package/dist/lib/utils/error-codes-messages.d.ts +216 -0
  28. package/dist/lib/utils/error-codes-messages.js +213 -0
  29. package/dist/lib/utils/error-codes-messages.js.map +1 -0
  30. package/dist/lib/utils/error-formatted-message.d.ts +5 -0
  31. package/dist/lib/utils/error-formatted-message.js +36 -0
  32. package/dist/lib/utils/error-formatted-message.js.map +1 -0
  33. package/dist/lib/utils/picocolor.js +23 -21
  34. package/dist/lib/utils/picocolor.js.map +1 -1
  35. package/dist/lib/utils/ze-http-request.js +5 -10
  36. package/dist/lib/utils/ze-http-request.js.map +1 -1
  37. package/dist/lib/zephyr-build-stats.d.ts +122 -0
  38. package/dist/lib/zephyr-build-stats.js +11 -0
  39. package/dist/lib/zephyr-build-stats.js.map +1 -0
  40. package/dist/lib/zephyr-edge-contract.d.ts +3 -0
  41. package/dist/package.json +1 -1
  42. package/package.json +1 -1
  43. package/dist/lib/utils/error-types.d.ts +0 -38
  44. package/dist/lib/utils/error-types.js +0 -69
  45. package/dist/lib/utils/error-types.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -8,16 +8,21 @@ 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
10
  export { ZeApplicationConfig, NetlifyIntegrationConfig, getAppConfig, remoteAppConfig, saveAppConfig, } from './lib/node-persist/application-configuration';
11
- export { getPartialAssetMap, removePartialAssetMap, savePartialAssetMap, } from './lib/node-persist/partial-assets-map';
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 * as color from "./lib/utils/picocolor";
17
- export { ze_log, ze_error, is_debug_enabled, brightBlueBgName, brightRedBgName, brightYellowBgName, dimmedName } 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';
18
20
  export { safe_json_parse } from './lib/utils/safe-json-parse';
19
21
  export { request } from './lib/utils/ze-http-request';
20
- export * as colors from "./lib/utils/picocolor";
22
+ export * as colors from './lib/utils/picocolor';
21
23
  export { LocalPackageJson } from './lib/ze-api/local-package-json';
22
24
  export { ConvertedGraph } from './lib/ze-api/converted-graph';
23
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.colors = exports.request = exports.safe_json_parse = exports.dimmedName = exports.brightYellowBgName = exports.brightRedBgName = exports.brightBlueBgName = exports.is_debug_enabled = exports.ze_error = exports.ze_log = exports.color = 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,12 +27,13 @@ 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; } });
30
32
  exports.color = tslib_1.__importStar(require("./lib/utils/picocolor"));
33
+ tslib_1.__exportStar(require("./lib/utils/debug-enabled"), exports);
31
34
  var debug_1 = require("./lib/utils/debug");
32
35
  Object.defineProperty(exports, "ze_log", { enumerable: true, get: function () { return debug_1.ze_log; } });
33
36
  Object.defineProperty(exports, "ze_error", { enumerable: true, get: function () { return debug_1.ze_error; } });
34
- Object.defineProperty(exports, "is_debug_enabled", { enumerable: true, get: function () { return debug_1.is_debug_enabled; } });
35
37
  Object.defineProperty(exports, "brightBlueBgName", { enumerable: true, get: function () { return debug_1.brightBlueBgName; } });
36
38
  Object.defineProperty(exports, "brightRedBgName", { enumerable: true, get: function () { return debug_1.brightRedBgName; } });
37
39
  Object.defineProperty(exports, "brightYellowBgName", { enumerable: true, get: function () { return debug_1.brightYellowBgName; } });
@@ -42,4 +44,5 @@ var ze_http_request_1 = require("./lib/utils/ze-http-request");
42
44
  Object.defineProperty(exports, "request", { enumerable: true, get: function () { return ze_http_request_1.request; } });
43
45
  exports.colors = tslib_1.__importStar(require("./lib/utils/picocolor"));
44
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"));
45
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,0FAMsD;AAHpD,yHAAA,YAAY,OAAA;AACZ,4HAAA,eAAe,OAAA;AACf,0HAAA,aAAa,OAAA;AAGf,4EAI+C;AAH7C,wHAAA,kBAAkB,OAAA;AAClB,2HAAA,qBA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E,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.zephyrcloud.app'; };
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,+BAA+B,CAAA,EAAA,CAAC;AAAtF,QAAA,eAAe,mBAAuE;AAEtF,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"}
@@ -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;AAEjC,iDAAsD;AAyBtD,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"],"names":[],"mappings":";;;;AAAA,+CAAkE;AAClE,qCAAkC;AAClC,yCAAiC;AAEjC,iDAAsD;AAyBtD,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,CAAC,eAAuB,EAAE,IAAyB;;QACpF,MAAM,OAAO,CAAC;QACd,KAAK,CAAC,MAAM,IAAA,sBAAO,EAAC,OAAO,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/E,CAAC;CAAA;AAHD,sCAGC;AAED,SAAsB,YAAY,CAAC,eAAuB;;QACxD,MAAM,OAAO,CAAC;QACd,OAAO,IAAA,sBAAO,EAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;IAC3C,CAAC;CAAA;AAHD,oCAGC;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 +1 @@
1
- {"version":3,"file":"hash-cache.js","sourceRoot":"","sources":["../../../src/lib/node-persist/hash-cache.ts"],"names":[],"mappings":";;;;AAAA,+CAAkE;AAClE,yCAAiC;AACjC,qCAAkC;AAClC,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,eAAe,CAAC,eAAuB,EAAE,KAA2B;;QACxF,MAAM,OAAO,CAAC;QACd,KAAK,CAAC,MAAM,IAAA,sBAAO,EAAC,GAAG,+CAAyB,IAAI,eAAe,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;IAC/G,CAAC;CAAA;AAHD,0CAGC;AAED,SAAsB,eAAe,CAAC,eAAuB;;QAC3D,MAAM,OAAO,CAAC;QACd,OAAO,IAAA,sBAAO,EAAC,GAAG,+CAAyB,IAAI,eAAe,EAAE,CAAC,CAAC;IACpE,CAAC;CAAA;AAHD,0CAGC;AAED,SAAsB,kBAAkB,CAAC,eAAuB;;QAC9D,MAAM,OAAO,CAAC;QACd,MAAM,IAAA,yBAAU,EAAC,GAAG,+CAAyB,IAAI,eAAe,EAAE,CAAC,CAAC;IACtE,CAAC;CAAA;AAHD,gDAGC"}
1
+ {"version":3,"file":"hash-cache.js","sourceRoot":"","sources":["../../../src/lib/node-persist/hash-cache.ts"],"names":[],"mappings":";;;;AAAA,+CAAkE;AAClE,yCAAiC;AACjC,qCAAkC;AAClC,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,eAAe,CACnC,eAAuB,EACvB,KAA2B;;QAE3B,MAAM,OAAO,CAAC;QACd,KAAK,CAAC,MAAM,IAAA,sBAAO,EACjB,GAAG,+CAAyB,IAAI,eAAe,EAAE,EACjD,KAAK,EACL,EAAE,GAAG,EAAE,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAC7B,CAAC,CAAC;IACL,CAAC;CAAA;AAVD,0CAUC;AAED,SAAsB,eAAe,CACnC,eAAuB;;QAEvB,MAAM,OAAO,CAAC;QACd,OAAO,IAAA,sBAAO,EAAC,GAAG,+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,EAAE,sBAAO,CAAC;CAC9B,CAAC,CAAC;AAEH,SAAsB,SAAS,CAAC,KAAa;;QAC3C,MAAM,OAAO,CAAC;QACd,KAAK,CAAC,MAAM,IAAA,sBAAO,mDAA4B,KAAK,CAAC,CAAC,CAAC;IACzD,CAAC;CAAA;AAHD,8BAGC;AAED,SAAsB,QAAQ;;QAC5B,MAAM,OAAO,CAAC;QACd,OAAO,IAAA,sBAAO,kDAA2B,CAAC;IAC5C,CAAC;CAAA;AAHD,4BAGC;AAED,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"}
1
+ {"version":3,"file":"token.js","sourceRoot":"","sources":["../../../src/lib/node-persist/token.ts"],"names":[],"mappings":";;;;AAAA,+CAAyE;AACzE,qCAAkC;AAClC,yCAAiC;AACjC,iDAAsD;AACtD,iDAAgD;AAEhD,MAAM,OAAO,GAAG,IAAA,mBAAI,EAAC;IACnB,GAAG,EAAE,IAAA,gBAAI,EAAC,IAAA,iBAAO,GAAE,EAAE,sBAAO,CAAC;CAC9B,CAAC,CAAC;AAEH,SAAsB,SAAS,CAAC,KAAa;;QAC3C,MAAM,OAAO,CAAC;QACd,KAAK,CAAC,MAAM,IAAA,sBAAO,mDAA4B,KAAK,CAAC,CAAC,CAAC;IACzD,CAAC;CAAA;AAHD,8BAGC;AAED,SAAsB,QAAQ;;QAC5B,MAAM,YAAY,GAAG,MAAM,IAAA,6BAAc,GAAE,CAAC;QAC5C,IAAI,YAAY,EAAE,CAAC;YACjB,OAAO,YAAY,CAAC;QACtB,CAAC;QACD,MAAM,OAAO,CAAC;QACd,OAAO,IAAA,sBAAO,kDAA2B,CAAC;IAC5C,CAAC;CAAA;AAPD,4BAOC;AAED,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"}
@@ -6,7 +6,7 @@ export interface ZephyrPluginOptions {
6
6
  zeConfig: {
7
7
  edge_url: string;
8
8
  user: string;
9
- buildId: string | undefined;
9
+ buildId: string;
10
10
  };
11
11
  application_uid: string;
12
12
  app: {
@@ -16,8 +16,8 @@ export interface ZephyrPluginOptions {
16
16
  version: string;
17
17
  };
18
18
  git: {
19
- name?: string;
20
- email?: string;
19
+ name: string;
20
+ email: string;
21
21
  branch: string;
22
22
  commit: string;
23
23
  };
@@ -6,6 +6,6 @@ export declare function createSnapshotId(options: {
6
6
  };
7
7
  zeConfig: {
8
8
  user: string;
9
- buildId: string | undefined;
9
+ buildId: string;
10
10
  };
11
11
  }): string;
@@ -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,29 +1,17 @@
1
- import { BuildErrorCode, DeployErrorCode, RuntimeErrorCode } from './error-types';
1
+ import { Errors } from './error-codes-messages';
2
2
  export declare const dimmedName: string;
3
3
  export declare const brightBlueBgName: string;
4
4
  export declare const brightYellowBgName: string;
5
5
  export declare const brightRedBgName: string;
6
- /** @description Custom error code sync with documentation on https://docs.zephyr-cloud.io */
7
- type CodeType = BuildErrorCode | DeployErrorCode | RuntimeErrorCode;
8
- declare class ZE_DEBUG {
9
- constructor();
10
- errorCodeFormatter(code: string): string;
11
- success(msg: string): void;
12
- log(msg: string): void;
13
- /** first parameter being error code, if this error is unknown and not defined, pass in "" as empty string as first parameter and it will auto return "Unknown error".
14
- * The code and error types located in [error-types.ts](./error-types.ts)
15
- * @description If error code is passed in it will return pretty and formatted error.
16
- * @example **Passing empty error code**
17
- * ```
18
- * ze_error("",
19
- `[${options?.method || 'GET'}][${url}]: ${Date.now() - req_start}ms \n ${_options_str} \n Error: ${e}`
20
- );
21
- ```
22
- */
23
- error(code?: CodeType | unknown, msg?: string | boolean | void, ...arg: unknown[]): void;
24
- }
25
- export declare const is_debug_enabled: boolean;
6
+ declare function print_error_with_docs<K extends keyof typeof Errors>(errMsg?: K, ...args: unknown[]): void;
26
7
  export declare const ze_log: import("debug").Debugger;
27
- export declare const ze_error: (code?: CodeType | unknown, msg?: string | boolean | void | undefined, ...arg: unknown[]) => void;
28
- export declare const console: ZE_DEBUG;
8
+ /** `ze_error` is used widely to debug our local build and deployment. You can turn on debug mode or having it work normally to attached documentation with our error codes in [errors](./error-types.ts). We have added unknown class to the error object.
9
+ * If this is an error we haven't defined yet, you will need to do
10
+ * @example
11
+ * ```ts
12
+ * ze_error('ERR_UNKNOWN', `Error creating dist folder: ${(error as Error).message}`);
13
+ * ```
14
+ * to specify this is an undefined error at the front.
15
+ */
16
+ export declare const ze_error: typeof print_error_with_docs;
29
17
  export {};
@@ -1,66 +1,31 @@
1
1
  "use strict";
2
- var _a;
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.console = exports.ze_error = exports.ze_log = exports.is_debug_enabled = exports.brightRedBgName = exports.brightYellowBgName = exports.brightBlueBgName = exports.dimmedName = 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
6
  const picocolor_1 = require("./picocolor");
9
- const error_types_1 = require("./error-types");
7
+ const debug_enabled_1 = require("./debug-enabled");
8
+ const error_formatted_message_1 = require("./error-formatted-message");
9
+ //TODO: this should be traced and logged into new relic
10
+ //TODO: print different colors to it + Capitalize maybe?
10
11
  const name = ' ZEPHYR ';
11
- const doc = 'For potential workaround, see documentation https://docs.zephyr-cloud.io/guide/error';
12
12
  exports.dimmedName = (0, picocolor_1.dim)(name);
13
13
  exports.brightBlueBgName = (0, picocolor_1.bold)((0, picocolor_1.bgCyanBright)((0, picocolor_1.black)(name)));
14
14
  exports.brightYellowBgName = (0, picocolor_1.bold)((0, picocolor_1.bgYellowBright)((0, picocolor_1.black)(name)));
15
- exports.brightRedBgName = (0, picocolor_1.bold)((0, picocolor_1.bgYellowBright)((0, picocolor_1.black)(name)));
16
- class ZE_DEBUG {
17
- constructor() {
18
- this.error = this.error.bind(this);
19
- }
20
- errorCodeFormatter(code) {
21
- return (0, picocolor_1.red)(`Error code: [${code}]`);
22
- }
23
- success(msg) {
24
- const blueMessage = (0, picocolor_1.blue)(msg);
25
- (0, debug_1.debug)(`\n${exports.brightBlueBgName} ${blueMessage}\n`);
26
- }
27
- log(msg) {
28
- const yellowMessage = (0, picocolor_1.yellow)(msg);
29
- (0, debug_1.debug)(`\n${exports.brightYellowBgName}:log ${yellowMessage} \n`);
30
- }
31
- /** first parameter being error code, if this error is unknown and not defined, pass in "" as empty string as first parameter and it will auto return "Unknown error".
32
- * The code and error types located in [error-types.ts](./error-types.ts)
33
- * @description If error code is passed in it will return pretty and formatted error.
34
- * @example **Passing empty error code**
35
- * ```
36
- * ze_error("",
37
- `[${options?.method || 'GET'}][${url}]: ${Date.now() - req_start}ms \n ${_options_str} \n Error: ${e}`
38
- );
39
- ```
40
- */
41
- error(code, msg, ...arg) {
42
- const redMessage = typeof msg === "string" ? (0, picocolor_1.red)(msg) : "Unknown error" + msg;
43
- const errorCode = this.errorCodeFormatter(code);
44
- let details = redMessage;
45
- if (typeof code === "string" && (code === null || code === void 0 ? void 0 : code.startsWith("BU"))) {
46
- details = (0, picocolor_1.red)(error_types_1.errorMessages.buildErrorMessages[code]);
47
- }
48
- if (typeof code === "string" && (code === null || code === void 0 ? void 0 : code.startsWith("DE"))) {
49
- details = (0, picocolor_1.red)(error_types_1.errorMessages.deployErrorMessages[code]);
50
- }
51
- if (typeof code === "string" && (code === null || code === void 0 ? void 0 : code.startsWith("RT"))) {
52
- details = (0, picocolor_1.red)(error_types_1.errorMessages.runtimeErrorMessages[code]);
53
- }
54
- const documentation = code ? (0, picocolor_1.red)(`\n${doc}/${code.toString().toLowerCase()}`) : (0, picocolor_1.red)(`\n${doc}`);
55
- exports.console.error.bind(`\n${exports.brightRedBgName} ${errorCode} ${details !== null && details !== void 0 ? details : redMessage} \n`, exports.console, ...arg, documentation);
56
- }
15
+ exports.brightRedBgName = (0, picocolor_1.bold)((0, picocolor_1.bgRedBright)((0, picocolor_1.black)(name)));
16
+ function print_error_with_docs(errMsg, ...args) {
17
+ errMsg ? console.log(`${exports.brightRedBgName} ${(0, error_formatted_message_1.err)(errMsg)} ${args} \n`) : console.log(exports.brightRedBgName, (0, picocolor_1.redBright)('Unknown error'), args);
57
18
  }
58
- const _zephyr_debug = (_a = process.env['DEBUG']) === null || _a === void 0 ? void 0 : _a.indexOf('zephyr');
59
- exports.is_debug_enabled = typeof _zephyr_debug === 'number'
60
- && _zephyr_debug !== -1;
61
- exports.ze_log = (0, debug_1.debug)(`${exports.brightBlueBgName}:log`);
62
- exports.ze_error = exports.is_debug_enabled
63
- ? (0, debug_1.debug)(`${exports.brightRedBgName}:error`)
64
- : new ZE_DEBUG().error;
65
- exports.console = new ZE_DEBUG();
19
+ exports.ze_log = (0, debug_1.debug)('zephyr:log');
20
+ // If debug mode is not enabled just print whatever console output is
21
+ // If debug mode is enabled print the error from our end
22
+ /** `ze_error` is used widely to debug our local build and deployment. You can turn on debug mode or having it work normally to attached documentation with our error codes in [errors](./error-types.ts). We have added unknown class to the error object.
23
+ * If this is an error we haven't defined yet, you will need to do
24
+ * @example
25
+ * ```ts
26
+ * ze_error('ERR_UNKNOWN', `Error creating dist folder: ${(error as Error).message}`);
27
+ * ```
28
+ * to specify this is an undefined error at the front.
29
+ */
30
+ exports.ze_error = debug_enabled_1.is_debug_enabled ? (0, debug_1.debug)('zephyr:error') : print_error_with_docs;
66
31
  //# 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;AACxC,2CAAsH;AACtH,+CAAkH;AAIlH,MAAM,IAAI,GAAG,UAAU,CAAC;AAExB,MAAM,GAAG,GAAG,sFAAsF,CAAA;AAErF,QA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