zephyr-edge-contract 0.0.26 → 0.0.28

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 (102) hide show
  1. package/dist/index.d.ts +9 -22
  2. package/dist/index.js +24 -45
  3. package/dist/index.js.map +1 -1
  4. package/dist/lib/api-contract-negotiation/get-api-contract.js +1 -0
  5. package/dist/lib/api-contract-negotiation/get-api-contract.js.map +1 -1
  6. package/dist/lib/edge-api/publish-request.d.ts +1 -1
  7. package/dist/lib/plugin-options/{zephyr-plugin-options.js → zephyr-webpack-plugin-options.js} +1 -1
  8. package/dist/lib/plugin-options/zephyr-webpack-plugin-options.js.map +1 -0
  9. package/dist/lib/promise/index.d.ts +29 -0
  10. package/dist/lib/promise/index.js +63 -0
  11. package/dist/lib/promise/index.js.map +1 -0
  12. package/dist/lib/snapshot.js +1 -0
  13. package/dist/lib/snapshot.js.map +1 -1
  14. package/dist/lib/{utils → string}/string.d.ts +6 -2
  15. package/dist/lib/{utils → string}/string.js +2 -1
  16. package/dist/lib/string/string.js.map +1 -0
  17. package/dist/lib/{utils → string}/strip-ansi.d.ts +2 -1
  18. package/dist/lib/{utils → string}/strip-ansi.js +2 -1
  19. package/dist/lib/string/strip-ansi.js.map +1 -0
  20. package/dist/lib/utils/{create-application-u-i-d.d.ts → create-application-uid.d.ts} +1 -1
  21. package/dist/lib/utils/{create-application-u-i-d.js → create-application-uid.js} +5 -6
  22. package/dist/lib/utils/create-application-uid.js.map +1 -0
  23. package/dist/lib/utils/create-snapshot-id.d.ts +7 -0
  24. package/dist/lib/utils/create-snapshot-id.js +18 -4
  25. package/dist/lib/utils/create-snapshot-id.js.map +1 -1
  26. package/dist/lib/utils/safe-json-parse.js.map +1 -1
  27. package/dist/lib/ze-api/local-package-json.d.ts +4 -4
  28. package/dist/lib/ze-api/local-package-json.js +4 -4
  29. package/dist/lib/zephyr-build-stats.d.ts +58 -39
  30. package/dist/lib/zephyr-build-stats.js +1 -0
  31. package/dist/lib/zephyr-build-stats.js.map +1 -1
  32. package/dist/lib/zephyr-edge-contract.d.ts +18 -40
  33. package/dist/lib/zephyr-edge-contract.js +1 -0
  34. package/dist/lib/zephyr-edge-contract.js.map +1 -1
  35. package/dist/package.json +6 -8
  36. package/package.json +6 -8
  37. package/dist/lib/errors/codes.d.ts +0 -282
  38. package/dist/lib/errors/codes.js +0 -371
  39. package/dist/lib/errors/codes.js.map +0 -1
  40. package/dist/lib/errors/index.d.ts +0 -2
  41. package/dist/lib/errors/index.js +0 -6
  42. package/dist/lib/errors/index.js.map +0 -1
  43. package/dist/lib/errors/zephyr.d.ts +0 -473
  44. package/dist/lib/errors/zephyr.js +0 -153
  45. package/dist/lib/errors/zephyr.js.map +0 -1
  46. package/dist/lib/node-persist/app-deploy-result-cache.d.ts +0 -7
  47. package/dist/lib/node-persist/app-deploy-result-cache.js +0 -26
  48. package/dist/lib/node-persist/app-deploy-result-cache.js.map +0 -1
  49. package/dist/lib/node-persist/application-configuration.d.ts +0 -4
  50. package/dist/lib/node-persist/application-configuration.js +0 -29
  51. package/dist/lib/node-persist/application-configuration.js.map +0 -1
  52. package/dist/lib/node-persist/fs-cache.d.ts +0 -3
  53. package/dist/lib/node-persist/fs-cache.js +0 -26
  54. package/dist/lib/node-persist/fs-cache.js.map +0 -1
  55. package/dist/lib/node-persist/hash-cache.d.ts +0 -7
  56. package/dist/lib/node-persist/hash-cache.js +0 -26
  57. package/dist/lib/node-persist/hash-cache.js.map +0 -1
  58. package/dist/lib/node-persist/partial-assets-map.d.ts +0 -4
  59. package/dist/lib/node-persist/partial-assets-map.js +0 -31
  60. package/dist/lib/node-persist/partial-assets-map.js.map +0 -1
  61. package/dist/lib/node-persist/secret-token.d.ts +0 -2
  62. package/dist/lib/node-persist/secret-token.js +0 -13
  63. package/dist/lib/node-persist/secret-token.js.map +0 -1
  64. package/dist/lib/node-persist/storage-keys.d.ts +0 -10
  65. package/dist/lib/node-persist/storage-keys.js +0 -15
  66. package/dist/lib/node-persist/storage-keys.js.map +0 -1
  67. package/dist/lib/node-persist/token.d.ts +0 -4
  68. package/dist/lib/node-persist/token.js +0 -36
  69. package/dist/lib/node-persist/token.js.map +0 -1
  70. package/dist/lib/node-persist/upload-provider-options.d.ts +0 -21
  71. package/dist/lib/node-persist/upload-provider-options.js +0 -13
  72. package/dist/lib/node-persist/upload-provider-options.js.map +0 -1
  73. package/dist/lib/plugin-options/zephyr-plugin-options.js.map +0 -1
  74. package/dist/lib/utils/clean-stack.d.ts +0 -7
  75. package/dist/lib/utils/clean-stack.js +0 -44
  76. package/dist/lib/utils/clean-stack.js.map +0 -1
  77. package/dist/lib/utils/create-application-u-i-d.js.map +0 -1
  78. package/dist/lib/utils/debug-enabled.d.ts +0 -1
  79. package/dist/lib/utils/debug-enabled.js +0 -9
  80. package/dist/lib/utils/debug-enabled.js.map +0 -1
  81. package/dist/lib/utils/debug.d.ts +0 -22
  82. package/dist/lib/utils/debug.js +0 -36
  83. package/dist/lib/utils/debug.js.map +0 -1
  84. package/dist/lib/utils/error-codes-messages.d.ts +0 -206
  85. package/dist/lib/utils/error-codes-messages.js +0 -203
  86. package/dist/lib/utils/error-codes-messages.js.map +0 -1
  87. package/dist/lib/utils/error-formatted-message.d.ts +0 -5
  88. package/dist/lib/utils/error-formatted-message.js +0 -36
  89. package/dist/lib/utils/error-formatted-message.js.map +0 -1
  90. package/dist/lib/utils/picocolor.d.ts +0 -43
  91. package/dist/lib/utils/picocolor.js +0 -85
  92. package/dist/lib/utils/picocolor.js.map +0 -1
  93. package/dist/lib/utils/promise.d.ts +0 -12
  94. package/dist/lib/utils/promise.js +0 -29
  95. package/dist/lib/utils/promise.js.map +0 -1
  96. package/dist/lib/utils/string.js.map +0 -1
  97. package/dist/lib/utils/strip-ansi.js.map +0 -1
  98. package/dist/lib/utils/ze-http-request.d.ts +0 -19
  99. package/dist/lib/utils/ze-http-request.js +0 -157
  100. package/dist/lib/utils/ze-http-request.js.map +0 -1
  101. package/test/utils/string.test.ts +0 -96
  102. /package/dist/lib/plugin-options/{zephyr-plugin-options.d.ts → zephyr-webpack-plugin-options.d.ts} +0 -0
@@ -1,206 +0,0 @@
1
- /** Categories for all error codes. */
2
- export declare const ErrorCategories: {
3
- readonly unknown: "00";
4
- readonly build: "10";
5
- readonly deploy: "20";
6
- readonly browser: "30";
7
- };
8
- /** @deprecated */
9
- export declare const Errors: {
10
- readonly ERR_UNKNOWN: {
11
- readonly id: "000";
12
- readonly message: "Unknown error. Tell us about it in Discord https://zephyr-cloud.io/discord if you see this error";
13
- readonly kind: "unknown";
14
- };
15
- /** Package.json not found error */
16
- readonly ERR_PACKAGE_JSON_NOT_FOUND: {
17
- readonly id: "010";
18
- readonly message: "Package.json not found";
19
- readonly kind: "build";
20
- };
21
- /** Package.json is not in a valid json format */
22
- readonly ERR_PACKAGE_JSON_NOT_VALID: {
23
- readonly id: "011";
24
- readonly message: "Package.json is not in a valid json format.";
25
- readonly kind: "build";
26
- };
27
- /** Webpack config error */
28
- readonly ERR_WEBPACK_CONFIG: {
29
- readonly id: "012";
30
- readonly message: "Webpack config error.";
31
- readonly kind: "build";
32
- };
33
- /** Package.json must have a name and version field. */
34
- readonly ERR_PACKAGE_JSON_MUST_HAVE_NAME_VERSION: {
35
- readonly id: "013";
36
- readonly message: "Package.json must have a name and version field.";
37
- readonly kind: "build";
38
- };
39
- /** Git remote origin is not configured properly. */
40
- readonly ERR_GIT_REMOTE_ORIGIN: {
41
- readonly id: "014";
42
- readonly message: "Git remote origin is not configured properly.";
43
- readonly kind: "build";
44
- };
45
- /** Git username or email is not configured. */
46
- readonly ERR_NO_GIT_USERNAME_EMAIL: {
47
- readonly id: "015";
48
- readonly message: "Git username or email is not configured.";
49
- readonly kind: "build";
50
- };
51
- /** Could not get git info */
52
- readonly ERR_NO_GIT_INFO: {
53
- readonly id: "016";
54
- readonly message: "Could not get git info.";
55
- readonly kind: "build";
56
- };
57
- /** Build error application_uid missing. */
58
- readonly ERR_MISSING_APPLICATION_UID: {
59
- readonly id: "017";
60
- readonly message: "`application_uid` missing.";
61
- readonly kind: "build";
62
- };
63
- /** Auth error */
64
- readonly ERR_AUTH_ERROR: {
65
- readonly id: "018";
66
- readonly message: "Auth error.";
67
- readonly kind: "build";
68
- };
69
- /** Could not get build id. */
70
- readonly ERR_GET_BUILD_ID: {
71
- readonly id: "019";
72
- readonly message: "Could not get build id.";
73
- readonly kind: "build";
74
- };
75
- /** Could not initialize Zephyr Agent. */
76
- readonly ERR_INITIALIZE_ZEPHYR_AGENT: {
77
- readonly id: "020";
78
- readonly message: "Could not initialize Zephyr Agent.";
79
- readonly kind: "build";
80
- };
81
- /** Cloudflare specific error */
82
- readonly ERR_UNABLE_CREATE_DIST_FOLDER: {
83
- readonly id: "021";
84
- readonly message: "Error creating dist folder.";
85
- readonly kind: "build";
86
- };
87
- /** Deployment error, assets not found */
88
- readonly ERR_ASSETS_NOT_FOUND: {
89
- readonly id: "010";
90
- readonly message: "Assets not found.";
91
- readonly kind: "deploy";
92
- };
93
- /** Assets not found in snapshot */
94
- readonly ERR_ASSETS_NOT_FOUND_IN_SNAPSHOT: {
95
- readonly id: "011";
96
- readonly message: "Assets not found in snapshot.";
97
- readonly kind: "deploy";
98
- };
99
- /** Application_uid missing */
100
- readonly ERR_DEPLOY_MISSING_APPLICATION_UID: {
101
- readonly id: "012";
102
- readonly message: "`application_uid` is required.";
103
- readonly kind: "deploy";
104
- };
105
- readonly ERR_MISSING_FILE_HASH: {
106
- readonly id: "013";
107
- readonly message: "Missing file hash.";
108
- readonly kind: "deploy";
109
- };
110
- /** Failed to load application configuration. */
111
- readonly ERR_LOAD_APP_CONFIG: {
112
- readonly id: "014";
113
- readonly message: "Failed to load application configuration.";
114
- readonly kind: "deploy";
115
- };
116
- /** Failed to upload build stats. */
117
- readonly ERR_FAILED_UPLOAD_BUILD_STATS: {
118
- readonly id: "015";
119
- readonly message: "Failed to upload build stats.";
120
- readonly kind: "deploy";
121
- };
122
- /** Did not receive envs from build stats upload */
123
- readonly ERR_NOT_RECEIVE_ENVS_FROM_BUILD_STATS: {
124
- readonly id: "016";
125
- readonly message: "Did not receive envs from build stats upload.";
126
- readonly kind: "deploy";
127
- };
128
- /** Failed to upload assets. */
129
- readonly ERR_FAILED_UPLOAD_ASSETS: {
130
- readonly id: "017";
131
- readonly message: "Failed to upload assets.";
132
- readonly kind: "deploy";
133
- };
134
- /** Failed to upload snapshots. */
135
- readonly ERR_FAILED_UPLOAD_SNAPSHOTS: {
136
- readonly id: "018";
137
- readonly message: "Failed to upload snapshots.";
138
- readonly kind: "deploy";
139
- };
140
- /** Snapshot uploads gave no results. */
141
- readonly ERR_SNAPSHOT_UPLOADS_NO_RESULTS: {
142
- readonly id: "019";
143
- readonly message: "Snapshot uploads gave no results.";
144
- readonly kind: "deploy";
145
- };
146
- /** Failed to get application hash list */
147
- readonly ERR_GET_APPLICATION_HASH_LIST: {
148
- readonly id: "020";
149
- readonly message: "Failed to get application hash list.";
150
- readonly kind: "deploy";
151
- };
152
- /** Could not resolve ${name} with verson ${version} */
153
- readonly ERR_NOT_RESOLVE_APP_NAME_WITH_VERSION: {
154
- readonly id: "021";
155
- readonly message: "Could not resolve application name with version.";
156
- readonly kind: "deploy";
157
- };
158
- readonly ERR_SNAPSHOT_ID_NOT_FOUND: {
159
- readonly id: "022";
160
- readonly message: "`snapshot_id` not found.";
161
- readonly kind: "deploy";
162
- };
163
- readonly ERR_SNAPSHOT_NOT_FOUND: {
164
- readonly id: "023";
165
- readonly message: "Snapshot not found.";
166
- readonly kind: "deploy";
167
- };
168
- readonly ERR_DEPLOY_LOCAL_BUILD: {
169
- readonly id: "024";
170
- readonly message: "Failed to deploy local build.";
171
- readonly kind: "deploy";
172
- };
173
- /** Cloudflare specific error */
174
- readonly ERR_WRANGLER_DEPENDENCY: {
175
- readonly id: "025";
176
- readonly message: "Wrangler dependency is needed for Cloudflare deployment. Please install dependencies without --no-optional flag.";
177
- readonly kind: "deploy";
178
- };
179
- readonly ERR_CONVERT_GRAPH_TO_DASHBOARD: {
180
- readonly id: "026";
181
- readonly message: "Failed to convert graph to dashboard data.";
182
- readonly kind: "browser";
183
- };
184
- readonly ERR_UPLOAD_TO_CLOUDFLARE_PAGES: {
185
- readonly id: "027";
186
- readonly message: "Error upload to cloudflare pages.";
187
- readonly kind: "deploy";
188
- };
189
- readonly ERR_NO_WRANGLER: {
190
- readonly id: "028";
191
- readonly message: "Wrangler dependency is needed for Cloudflare deployment. Please install dependencies without --no-optional flag.";
192
- readonly kind: "build";
193
- };
194
- readonly ERR_CREATE_DIST_FOLDER: {
195
- readonly id: "029";
196
- readonly message: "Error creating dist folder.";
197
- readonly kind: "build";
198
- };
199
- };
200
- export type ZeErrors = {
201
- [K in keyof Errors]: ZeError<Categories[Errors[K]['kind']], Errors[K]['id']>;
202
- }[keyof Errors];
203
- type Errors = typeof Errors;
204
- type Categories = typeof ErrorCategories;
205
- type ZeError<Category extends string, Code extends string> = `ZE${Category}${Code}`;
206
- export {};
@@ -1,203 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Errors = exports.ErrorCategories = void 0;
4
- /** Categories for all error codes. */
5
- exports.ErrorCategories = {
6
- unknown: '00',
7
- build: '10',
8
- deploy: '20',
9
- browser: '30',
10
- };
11
- /** @deprecated */
12
- exports.Errors = {
13
- ERR_UNKNOWN: {
14
- id: '000',
15
- message: 'Unknown error. Tell us about it in Discord https://zephyr-cloud.io/discord if you see this error',
16
- kind: 'unknown',
17
- },
18
- /** Package.json not found error */
19
- ERR_PACKAGE_JSON_NOT_FOUND: {
20
- id: '010',
21
- message: 'Package.json not found',
22
- kind: 'build',
23
- },
24
- /** Package.json is not in a valid json format */
25
- ERR_PACKAGE_JSON_NOT_VALID: {
26
- id: '011',
27
- message: 'Package.json is not in a valid json format.',
28
- kind: 'build',
29
- },
30
- /** Webpack config error */
31
- ERR_WEBPACK_CONFIG: {
32
- id: '012',
33
- message: 'Webpack config error.',
34
- kind: 'build',
35
- }, // TODO: we don't detect this error yet, will we be able to separate them?
36
- /** Package.json must have a name and version field. */
37
- ERR_PACKAGE_JSON_MUST_HAVE_NAME_VERSION: {
38
- id: '013',
39
- message: 'Package.json must have a name and version field.',
40
- kind: 'build',
41
- },
42
- /** Git remote origin is not configured properly. */
43
- ERR_GIT_REMOTE_ORIGIN: {
44
- id: '014',
45
- message: 'Git remote origin is not configured properly.',
46
- kind: 'build',
47
- },
48
- /** Git username or email is not configured. */
49
- ERR_NO_GIT_USERNAME_EMAIL: {
50
- id: '015',
51
- message: 'Git username or email is not configured.',
52
- kind: 'build',
53
- },
54
- /** Could not get git info */
55
- ERR_NO_GIT_INFO: {
56
- id: '016',
57
- message: 'Could not get git info.',
58
- kind: 'build',
59
- },
60
- /** Build error application_uid missing. */
61
- ERR_MISSING_APPLICATION_UID: {
62
- id: '017',
63
- message: '`application_uid` missing.',
64
- kind: 'build',
65
- },
66
- /** Auth error */
67
- ERR_AUTH_ERROR: {
68
- id: '018',
69
- message: 'Auth error.',
70
- kind: 'build',
71
- },
72
- /** Could not get build id. */
73
- ERR_GET_BUILD_ID: {
74
- id: '019',
75
- message: 'Could not get build id.',
76
- kind: 'build',
77
- },
78
- /** Could not initialize Zephyr Agent. */
79
- ERR_INITIALIZE_ZEPHYR_AGENT: {
80
- id: '020',
81
- message: 'Could not initialize Zephyr Agent.',
82
- kind: 'build',
83
- },
84
- /** Cloudflare specific error */
85
- ERR_UNABLE_CREATE_DIST_FOLDER: {
86
- id: '021',
87
- message: 'Error creating dist folder.',
88
- kind: 'build',
89
- },
90
- /** Deployment error, assets not found */
91
- ERR_ASSETS_NOT_FOUND: {
92
- id: '010',
93
- message: 'Assets not found.',
94
- kind: 'deploy',
95
- },
96
- /** Assets not found in snapshot */
97
- ERR_ASSETS_NOT_FOUND_IN_SNAPSHOT: {
98
- id: '011',
99
- message: 'Assets not found in snapshot.',
100
- kind: 'deploy',
101
- },
102
- /** Application_uid missing */
103
- ERR_DEPLOY_MISSING_APPLICATION_UID: {
104
- id: '012',
105
- message: '`application_uid` is required.',
106
- kind: 'deploy',
107
- },
108
- ERR_MISSING_FILE_HASH: {
109
- id: '013',
110
- message: 'Missing file hash.',
111
- kind: 'deploy',
112
- },
113
- /** Failed to load application configuration. */
114
- ERR_LOAD_APP_CONFIG: {
115
- id: '014',
116
- message: 'Failed to load application configuration.',
117
- kind: 'deploy',
118
- },
119
- /** Failed to upload build stats. */
120
- ERR_FAILED_UPLOAD_BUILD_STATS: {
121
- id: '015',
122
- message: 'Failed to upload build stats.',
123
- kind: 'deploy',
124
- },
125
- /** Did not receive envs from build stats upload */
126
- ERR_NOT_RECEIVE_ENVS_FROM_BUILD_STATS: {
127
- id: '016',
128
- message: 'Did not receive envs from build stats upload.',
129
- kind: 'deploy',
130
- },
131
- /** Failed to upload assets. */
132
- ERR_FAILED_UPLOAD_ASSETS: {
133
- id: '017',
134
- message: 'Failed to upload assets.',
135
- kind: 'deploy',
136
- },
137
- /** Failed to upload snapshots. */
138
- ERR_FAILED_UPLOAD_SNAPSHOTS: {
139
- id: '018',
140
- message: 'Failed to upload snapshots.',
141
- kind: 'deploy',
142
- },
143
- /** Snapshot uploads gave no results. */
144
- ERR_SNAPSHOT_UPLOADS_NO_RESULTS: {
145
- id: '019',
146
- message: 'Snapshot uploads gave no results.',
147
- kind: 'deploy',
148
- },
149
- /** Failed to get application hash list */
150
- ERR_GET_APPLICATION_HASH_LIST: {
151
- id: '020',
152
- message: 'Failed to get application hash list.',
153
- kind: 'deploy',
154
- },
155
- /** Could not resolve ${name} with verson ${version} */
156
- ERR_NOT_RESOLVE_APP_NAME_WITH_VERSION: {
157
- id: '021',
158
- message: 'Could not resolve application name with version.',
159
- kind: 'deploy',
160
- },
161
- ERR_SNAPSHOT_ID_NOT_FOUND: {
162
- id: '022',
163
- message: '`snapshot_id` not found.',
164
- kind: 'deploy',
165
- },
166
- ERR_SNAPSHOT_NOT_FOUND: {
167
- id: '023',
168
- message: 'Snapshot not found.',
169
- kind: 'deploy',
170
- },
171
- ERR_DEPLOY_LOCAL_BUILD: {
172
- id: '024',
173
- message: 'Failed to deploy local build.',
174
- kind: 'deploy',
175
- },
176
- /** Cloudflare specific error */
177
- ERR_WRANGLER_DEPENDENCY: {
178
- id: '025',
179
- message: 'Wrangler dependency is needed for Cloudflare deployment. Please install dependencies without --no-optional flag.',
180
- kind: 'deploy',
181
- },
182
- ERR_CONVERT_GRAPH_TO_DASHBOARD: {
183
- id: '026',
184
- message: 'Failed to convert graph to dashboard data.',
185
- kind: 'browser',
186
- },
187
- ERR_UPLOAD_TO_CLOUDFLARE_PAGES: {
188
- id: '027',
189
- message: 'Error upload to cloudflare pages.',
190
- kind: 'deploy',
191
- },
192
- ERR_NO_WRANGLER: {
193
- id: '028',
194
- message: 'Wrangler dependency is needed for Cloudflare deployment. Please install dependencies without --no-optional flag.',
195
- kind: 'build',
196
- },
197
- ERR_CREATE_DIST_FOLDER: {
198
- id: '029',
199
- message: 'Error creating dist folder.',
200
- kind: 'build',
201
- },
202
- };
203
- //# sourceMappingURL=error-codes-messages.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-codes-messages.js","sourceRoot":"","sources":["../../../src/lib/utils/error-codes-messages.ts"],"names":[],"mappings":";;;AAAA,sCAAsC;AACzB,QAAA,eAAe,GAAG;IAC7B,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;CAGd,CAAC;AAEF,kBAAkB;AACL,QAAA,MAAM,GAAG;IACpB,WAAW,EAAE;QACX,EAAE,EAAE,KAAK;QACT,OAAO,EAAE,kGAAkG;QAC3G,IAAI,EAAE,SAAS;KAChB;IACD,mCAAmC;IACnC,0BAA0B,EAAE;QAC1B,EAAE,EAAE,KAAK;QACT,OAAO,EAAE,wBAAwB;QACjC,IAAI,EAAE,OAAO;KACd;IACD,iDAAiD;IACjD,0BAA0B,EAAE;QAC1B,EAAE,EAAE,KAAK;QACT,OAAO,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EAAE,EAAE,KAAK;QACT,OAAO,EAAE,kDAAkD;QAC3D,IAAI,EAAE,QAAQ;KACf;IACD,yBAAyB,EAAE;QACzB,EAAE,EAAE,KAAK;QACT,OAAO,EAAE,0BAA0B;QACnC,IAAI,EAAE,QAAQ;KACf;IACD,sBAAsB,EAAE;QACtB,EAAE,EAAE,KAAK;QACT,OAAO,EAAE,qBAAqB;QAC9B,IAAI,EAAE,QAAQ;KACf;IACD,sBAAsB,EAAE;QACtB,EAAE,EAAE,KAAK;QACT,OAAO,EAAE,+BAA+B;QACxC,IAAI,EAAE,QAAQ;KACf;IACD,gCAAgC;IAChC,uBAAuB,EAAE;QACvB,EAAE,EAAE,KAAK;QACT,OAAO,EAAE,kHAAkH;QAC3H,IAAI,EAAE,QAAQ;KACf;IACD,8BAA8B,EAAE;QAC9B,EAAE,EAAE,KAAK;QACT,OAAO,EAAE,4CAA4C;QACrD,IAAI,EAAE,SAAS;KAChB;IACD,8BAA8B,EAAE;QAC9B,EAAE,EAAE,KAAK;QACT,OAAO,EAAE,mCAAmC;QAC5C,IAAI,EAAE,QAAQ;KACf;IACD,eAAe,EAAE;QACf,EAAE,EAAE,KAAK;QACT,OAAO,EAAE,kHAAkH;QAC3H,IAAI,EAAE,OAAO;KACd;IACD,sBAAsB,EAAE;QACtB,EAAE,EAAE,KAAK;QACT,OAAO,EAAE,6BAA6B;QACtC,IAAI,EAAE,OAAO;KACd;CAOF,CAAC"}
@@ -1,5 +0,0 @@
1
- import { Errors } from './error-codes-messages';
2
- export declare const docsPrefix = "https://docs.zephyr-cloud.io/errors";
3
- export declare function errCode<K extends keyof typeof Errors>(err: K): `ZE${string}${string}`;
4
- export declare function errMsg<K extends keyof typeof Errors>(err: K): "Package.json is not in a valid json format." | "Webpack config error." | "`application_uid` missing." | "Could not initialize Zephyr Agent." | "Error creating dist folder." | "Assets not found." | "Assets not found in snapshot." | "`application_uid` is required." | "Missing file hash." | "Did not receive envs from build stats upload." | "Snapshot uploads gave no results." | "Failed to get application hash list." | "`snapshot_id` not found." | "Snapshot not found." | "Failed to deploy local build." | "Wrangler dependency is needed for Cloudflare deployment. Please install dependencies without --no-optional flag." | "Failed to load application configuration." | "Unknown error. Tell us about it in Discord https://zephyr-cloud.io/discord if you see this error" | "Package.json not found" | "Package.json must have a name and version field." | "Git remote origin is not configured properly." | "Git username or email is not configured." | "Could not get git info." | "Auth error." | "Could not get build id." | "Failed to upload build stats." | "Failed to upload assets." | "Failed to upload snapshots." | "Could not resolve application name with version." | "Failed to convert graph to dashboard data." | "Error upload to cloudflare pages.";
5
- export declare function err<K extends keyof typeof Errors>(err: K): string;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.err = exports.errMsg = exports.errCode = 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
- const picocolor_1 = require("./picocolor");
6
- const error_codes_messages_1 = require("./error-codes-messages");
7
- exports.docsPrefix = 'https://docs.zephyr-cloud.io/errors';
8
- function errCode(err) {
9
- const id = error_codes_messages_1.Errors[err].id;
10
- const prefix = error_codes_messages_1.ErrorCategories[error_codes_messages_1.Errors[err].kind];
11
- // we have less categories and more errors, so make sense to be ZEPPIII
12
- // where ZE is a constant, PP is the category, and I is the error id
13
- const paddedId = id.toString().padStart(3, '0');
14
- const paddedPrefix = prefix.toString().padStart(2, '0');
15
- return `ZE${paddedPrefix}${paddedId}`;
16
- }
17
- exports.errCode = errCode;
18
- function errMsg(err) {
19
- return error_codes_messages_1.Errors[err].message;
20
- }
21
- exports.errMsg = errMsg;
22
- function err(err) {
23
- const id = error_codes_messages_1.Errors[err].id;
24
- const prefix = error_codes_messages_1.ErrorCategories[error_codes_messages_1.Errors[err].kind];
25
- // we have less categories and more errors, so make sense to be ZEPPIII
26
- // where ZE is a constant, PP is the category, and I is the error id
27
- const paddedId = id.toString().padStart(3, '0');
28
- const paddedPrefix = prefix.toString().padStart(2, '0');
29
- const errorCode = `ZE${paddedPrefix}${paddedId}`;
30
- const errorMsg = error_codes_messages_1.Errors[err].message;
31
- const errorDoc = `See potential workaround and how to debug this error in our documentation ${exports.docsPrefix}/${errorCode.toLowerCase()}`;
32
- const fullMsg = (0, picocolor_1.redBright)(`Error code: ${errorCode}. ${errorMsg} \n ${errorDoc}`);
33
- return fullMsg;
34
- }
35
- exports.err = err;
36
- //# sourceMappingURL=error-formatted-message.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-formatted-message.js","sourceRoot":"","sources":["../../../src/lib/utils/error-formatted-message.ts"],"names":[],"mappings":";;;AAAA,kJAAkJ;AAClJ,2CAAwC;AACxC,iEAAiE;AACpD,QAAA,UAAU,GAAG,qCAAqC,CAAC;AAEhE,SAAgB,OAAO,CAAgC,GAAM;IAC3D,MAAM,EAAE,GAAG,6BAAM,CAAC,GAAG,CAAC,CAAC,EAA8B,CAAC;IACtD,MAAM,MAAM,GAAG,sCAAe,CAAC,6BAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAyD,CAAC;IAEzG,uEAAuE;IACvE,oEAAoE;IAEpE,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAChD,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAExD,OAAO,KAAK,YAAY,GAAG,QAAQ,EAAW,CAAC;AACjD,CAAC;AAXD,0BAWC;AAED,SAAgB,MAAM,CAAgC,GAAM;IAC1D,OAAO,6BAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC;AAC7B,CAAC;AAFD,wBAEC;AAED,SAAgB,GAAG,CAAgC,GAAM;IACvD,MAAM,EAAE,GAAG,6BAAM,CAAC,GAAG,CAAC,CAAC,EAA8B,CAAC;IACtD,MAAM,MAAM,GAAG,sCAAe,CAAC,6BAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAyD,CAAC;IAEzG,uEAAuE;IACvE,oEAAoE;IACpE,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAChD,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAExD,MAAM,SAAS,GAAG,KAAK,YAAY,GAAG,QAAQ,EAAW,CAAC;IAC1D,MAAM,QAAQ,GAAG,6BAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC;IACrC,MAAM,QAAQ,GAAG,6EAA6E,kBAAU,IAAI,SAAS,CAAC,WAAW,EAAE,EAAE,CAAC;IAEtI,MAAM,OAAO,GAAG,IAAA,qBAAS,EAAC,eAAe,SAAS,KAAK,QAAQ,OAAO,QAAQ,EAAE,CAAC,CAAC;IAElF,OAAO,OAAO,CAAC;AACjB,CAAC;AAhBD,kBAgBC"}
@@ -1,43 +0,0 @@
1
- export declare const isTTY: string | boolean;
2
- export declare const reset: (s: string) => string;
3
- export declare const bold: (input: string) => string;
4
- export declare const dim: (input: string) => string;
5
- export declare const italic: (input: string) => string;
6
- export declare const underline: (input: string) => string;
7
- export declare const inverse: (input: string) => string;
8
- export declare const hidden: (input: string) => string;
9
- export declare const strikethrough: (input: string) => string;
10
- export declare const black: (input: string) => string;
11
- export declare const red: (input: string) => string;
12
- export declare const green: (input: string) => string;
13
- export declare const yellow: (input: string) => string;
14
- export declare const blue: (input: string) => string;
15
- export declare const magenta: (input: string) => string;
16
- export declare const purple: (input: string) => string;
17
- export declare const cyan: (input: string) => string;
18
- export declare const white: (input: string) => string;
19
- export declare const gray: (input: string) => string;
20
- export declare const bgBlack: (input: string) => string;
21
- export declare const bgRed: (input: string) => string;
22
- export declare const bgGreen: (input: string) => string;
23
- export declare const bgYellow: (input: string) => string;
24
- export declare const bgBlue: (input: string) => string;
25
- export declare const bgMagenta: (input: string) => string;
26
- export declare const bgCyan: (input: string) => string;
27
- export declare const bgWhite: (input: string) => string;
28
- export declare const blackBright: (input: string) => string;
29
- export declare const redBright: (input: string) => string;
30
- export declare const greenBright: (input: string) => string;
31
- export declare const yellowBright: (input: string) => string;
32
- export declare const blueBright: (input: string) => string;
33
- export declare const magentaBright: (input: string) => string;
34
- export declare const cyanBright: (input: string) => string;
35
- export declare const whiteBright: (input: string) => string;
36
- export declare const bgBlackBright: (input: string) => string;
37
- export declare const bgRedBright: (input: string) => string;
38
- export declare const bgGreenBright: (input: string) => string;
39
- export declare const bgYellowBright: (input: string) => string;
40
- export declare const bgBlueBright: (input: string) => string;
41
- export declare const bgMagentaBright: (input: string) => string;
42
- export declare const bgCyanBright: (input: string) => string;
43
- export declare const bgWhiteBright: (input: string) => string;
@@ -1,85 +0,0 @@
1
- "use strict";
2
- // ISC License
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- 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 = exports.isTTY = void 0;
5
- // Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov
6
- // Permission to use, copy, modify, and/or distribute this software for any
7
- // purpose with or without fee is hereby granted, provided that the above
8
- // copyright notice and this permission notice appear in all copies.
9
- // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
- // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
- // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
- // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
- // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
- // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
- // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
- //
17
- // https://github.com/alexeyraspopov/picocolors/blob/b6261487e7b81aaab2440e397a356732cad9e342/picocolors.js#L1
18
- const debug_enabled_1 = require("./debug-enabled");
19
- const node_tty_1 = require("node:tty");
20
- exports.isTTY = (!debug_enabled_1.is_debug_enabled && !process.env['NO_COLOR'] && process.env['FORCE_COLOR']) ||
21
- ((0, node_tty_1.isatty)(process.stdout.fd) && !process.env['CI'] && process.env['TERM'] !== 'dumb');
22
- // const enabled = env
23
- const replaceClose = (str, close, replace, index) => {
24
- const start = str.substring(0, index) + replace;
25
- const end = str.substring(index + close.length);
26
- const nextIndex = end.indexOf(close);
27
- return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;
28
- };
29
- const formatter = (open, close, replace = open) => {
30
- if (!exports.isTTY)
31
- return String;
32
- return (input) => {
33
- const string = '' + input;
34
- const index = string.indexOf(close, open.length);
35
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
36
- };
37
- };
38
- // text styles
39
- exports.reset = exports.isTTY ? (s) => `\x1b[0m${s}\x1b[0m` : String;
40
- exports.bold = formatter('\x1b[1m', '\x1b[22m', '\x1b[22m\x1b[1m');
41
- exports.dim = formatter('\x1b[2m', '\x1b[22m', '\x1b[22m\x1b[2m');
42
- exports.italic = formatter('\x1b[3m', '\x1b[23m');
43
- exports.underline = formatter('\x1b[4m', '\x1b[24m');
44
- exports.inverse = formatter('\x1b[7m', '\x1b[27m');
45
- exports.hidden = formatter('\x1b[8m', '\x1b[28m');
46
- exports.strikethrough = formatter('\x1b[9m', '\x1b[29m');
47
- // text colors
48
- exports.black = formatter('\x1b[30m', '\x1b[39m');
49
- exports.red = formatter('\x1b[31m', '\x1b[39m');
50
- exports.green = formatter('\x1b[32m', '\x1b[39m');
51
- exports.yellow = formatter('\x1b[33m', '\x1b[39m');
52
- exports.blue = formatter('\x1b[34m', '\x1b[39m');
53
- exports.magenta = formatter('\x1b[35m', '\x1b[39m');
54
- exports.purple = formatter('\x1b[38;2;173;127;168m', '\x1b[39m');
55
- exports.cyan = formatter('\x1b[36m', '\x1b[39m');
56
- exports.white = formatter('\x1b[37m', '\x1b[39m');
57
- exports.gray = formatter('\x1b[90m', '\x1b[39m');
58
- // background colors
59
- exports.bgBlack = formatter('\x1b[40m', '\x1b[49m');
60
- exports.bgRed = formatter('\x1b[41m', '\x1b[49m');
61
- exports.bgGreen = formatter('\x1b[42m', '\x1b[49m');
62
- exports.bgYellow = formatter('\x1b[43m', '\x1b[49m');
63
- exports.bgBlue = formatter('\x1b[44m', '\x1b[49m');
64
- exports.bgMagenta = formatter('\x1b[45m', '\x1b[49m');
65
- exports.bgCyan = formatter('\x1b[46m', '\x1b[49m');
66
- exports.bgWhite = formatter('\x1b[47m', '\x1b[49m');
67
- // special text colors
68
- exports.blackBright = formatter('\x1b[90m', '\x1b[39m');
69
- exports.redBright = formatter('\x1b[91m', '\x1b[39m');
70
- exports.greenBright = formatter('\x1b[92m', '\x1b[39m');
71
- exports.yellowBright = formatter('\x1b[93m', '\x1b[39m');
72
- exports.blueBright = formatter('\x1b[94m', '\x1b[39m');
73
- exports.magentaBright = formatter('\x1b[95m', '\x1b[39m');
74
- exports.cyanBright = formatter('\x1b[96m', '\x1b[39m');
75
- exports.whiteBright = formatter('\x1b[97m', '\x1b[39m');
76
- // special background colors
77
- exports.bgBlackBright = formatter('\x1b[100m', '\x1b[49m');
78
- exports.bgRedBright = formatter('\x1b[101m', '\x1b[49m');
79
- exports.bgGreenBright = formatter('\x1b[102m', '\x1b[49m');
80
- exports.bgYellowBright = formatter('\x1b[103m', '\x1b[49m');
81
- exports.bgBlueBright = formatter('\x1b[104m', '\x1b[49m');
82
- exports.bgMagentaBright = formatter('\x1b[105m', '\x1b[49m');
83
- exports.bgCyanBright = formatter('\x1b[106m', '\x1b[49m');
84
- exports.bgWhiteBright = formatter('\x1b[107m', '\x1b[49m');
85
- //# sourceMappingURL=picocolor.js.map
@@ -1 +0,0 @@
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;AACnD,uCAAkC;AAErB,QAAA,KAAK,GAChB,CAAC,CAAC,gCAAgB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC7E,CAAC,IAAA,iBAAM,EAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC,CAAC;AAEtF,sBAAsB;AAEtB,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,KAAa,EAAE,OAAe,EAAE,KAAa,EAAU,EAAE;IAC1F,MAAM,KAAK,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC;IAChD,MAAM,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC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SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * ES 2023 Promise.withResolvers() polyfill
3
- *
4
- * @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers
5
- */
6
- export declare function PromiseWithResolvers<T>(): {
7
- promise: Promise<T>;
8
- resolve: (value: T | PromiseLike<T>) => void;
9
- reject: (reason?: unknown) => void;
10
- };
11
- /** Creates a `[boolean, error, value]` tuple value from a promise. */
12
- export declare function PromiseTuple<P>(maybePromise: PromiseLike<P> | P): Promise<[false, unknown] | [true, null, P]>;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PromiseTuple = exports.PromiseWithResolvers = void 0;
4
- /**
5
- * ES 2023 Promise.withResolvers() polyfill
6
- *
7
- * @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers
8
- */
9
- function PromiseWithResolvers() {
10
- let resolve;
11
- let reject;
12
- const promise = new Promise((res, rej) => {
13
- resolve = res;
14
- reject = rej;
15
- });
16
- return { promise, resolve, reject };
17
- }
18
- exports.PromiseWithResolvers = PromiseWithResolvers;
19
- /** Creates a `[boolean, error, value]` tuple value from a promise. */
20
- async function PromiseTuple(maybePromise) {
21
- try {
22
- return [true, null, await maybePromise];
23
- }
24
- catch (err) {
25
- return [false, err];
26
- }
27
- }
28
- exports.PromiseTuple = PromiseTuple;
29
- //# sourceMappingURL=promise.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"promise.js","sourceRoot":"","sources":["../../../src/lib/utils/promise.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,SAAgB,oBAAoB;IAClC,IAAI,OAA6C,CAAC;IAClD,IAAI,MAAmC,CAAC;IAExC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAI,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC1C,OAAO,GAAG,GAAG,CAAC;QACd,MAAM,GAAG,GAAG,CAAC;IACf,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AACtC,CAAC;AAVD,oDAUC;AAED,sEAAsE;AAC/D,KAAK,UAAU,YAAY,CAAI,YAAgC;IACpE,IAAI,CAAC;QACH,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC,CAAC;IAC1C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACtB,CAAC;AACH,CAAC;AAND,oCAMC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"string.js","sourceRoot":"","sources":["../../../src/lib/utils/string.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,SAAgB,YAAY,CAAyB,GAAM,EAAE,MAA2D;IACtH,OAAO,GAAG,CAAC,OAAO,CAAC,uCAAuC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;QAC1E,OAAO,MAAM,CAAC,GAAuB,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,oCAIC"}