@curenorway/kode-cli 1.10.0 → 1.12.0
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.
- package/dist/{chunk-CUZJE4JZ.js → chunk-XU4YS3JQ.js} +893 -480
- package/dist/cli.js +1342 -168
- package/dist/index.d.ts +45 -11
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -76,6 +76,9 @@ interface CdnPage {
|
|
|
76
76
|
pattern_type: 'exact' | 'prefix' | 'wildcard' | 'regex';
|
|
77
77
|
priority: number;
|
|
78
78
|
is_active: boolean;
|
|
79
|
+
parent_id?: string | null;
|
|
80
|
+
created_at?: string;
|
|
81
|
+
updated_at?: string;
|
|
79
82
|
}
|
|
80
83
|
interface CdnDeployment {
|
|
81
84
|
id: string;
|
|
@@ -146,6 +149,41 @@ declare class KodeApiClient {
|
|
|
146
149
|
changeSummary?: string;
|
|
147
150
|
}): Promise<CdnScript>;
|
|
148
151
|
listPages(siteId: string): Promise<CdnPage[]>;
|
|
152
|
+
getPage(pageId: string): Promise<CdnPage>;
|
|
153
|
+
createPage(siteId: string, data: {
|
|
154
|
+
name: string;
|
|
155
|
+
urlPatterns: string[];
|
|
156
|
+
patternType?: 'exact' | 'prefix' | 'wildcard' | 'regex';
|
|
157
|
+
priority?: number;
|
|
158
|
+
parentId?: string;
|
|
159
|
+
}): Promise<CdnPage>;
|
|
160
|
+
updatePage(pageId: string, data: {
|
|
161
|
+
name?: string;
|
|
162
|
+
urlPatterns?: string[];
|
|
163
|
+
patternType?: 'exact' | 'prefix' | 'wildcard' | 'regex';
|
|
164
|
+
priority?: number;
|
|
165
|
+
parentId?: string | null;
|
|
166
|
+
isActive?: boolean;
|
|
167
|
+
}): Promise<CdnPage>;
|
|
168
|
+
deletePage(pageId: string): Promise<{
|
|
169
|
+
success: boolean;
|
|
170
|
+
message: string;
|
|
171
|
+
}>;
|
|
172
|
+
assignScriptToPage(pageId: string, scriptId: string, loadOrderOverride?: number): Promise<{
|
|
173
|
+
id: string;
|
|
174
|
+
page_id: string;
|
|
175
|
+
script_id: string;
|
|
176
|
+
}>;
|
|
177
|
+
removeScriptFromPage(pageId: string, scriptId: string): Promise<{
|
|
178
|
+
success: boolean;
|
|
179
|
+
}>;
|
|
180
|
+
getPageScripts(pageId: string): Promise<Array<{
|
|
181
|
+
id: string;
|
|
182
|
+
script_id: string;
|
|
183
|
+
load_order_override: number | null;
|
|
184
|
+
is_enabled: boolean;
|
|
185
|
+
script: CdnScript;
|
|
186
|
+
}>>;
|
|
149
187
|
deploy(siteId: string, environment?: 'staging' | 'production'): Promise<CdnDeployment>;
|
|
150
188
|
promoteToProduction(siteId: string, stagingDeploymentId?: string): Promise<CdnDeployment>;
|
|
151
189
|
getDeploymentStatus(siteId: string): Promise<{
|
|
@@ -207,9 +245,11 @@ declare function createApiClient(config: ProjectConfig): KodeApiClient;
|
|
|
207
245
|
* Initialize Cure Kode in current directory
|
|
208
246
|
*
|
|
209
247
|
* Simplified flow:
|
|
210
|
-
* 1.
|
|
211
|
-
* 2.
|
|
212
|
-
* 3.
|
|
248
|
+
* 1. Show beautiful banner
|
|
249
|
+
* 2. Ask for API key only
|
|
250
|
+
* 3. Validate key and fetch site info from API
|
|
251
|
+
* 4. Check Webflow configuration - block if not set
|
|
252
|
+
* 5. Auto-configure everything else
|
|
213
253
|
*/
|
|
214
254
|
declare function initCommand(options: {
|
|
215
255
|
apiKey?: string;
|
|
@@ -232,6 +272,7 @@ declare function pushCommand(options: {
|
|
|
232
272
|
message?: string;
|
|
233
273
|
all?: boolean;
|
|
234
274
|
autoLoad?: boolean;
|
|
275
|
+
force?: boolean;
|
|
235
276
|
}): Promise<void>;
|
|
236
277
|
|
|
237
278
|
/**
|
|
@@ -246,17 +287,10 @@ declare function watchCommand(options: {
|
|
|
246
287
|
deploy?: boolean;
|
|
247
288
|
}): Promise<void>;
|
|
248
289
|
|
|
249
|
-
/**
|
|
250
|
-
* Deploy to staging or production
|
|
251
|
-
*
|
|
252
|
-
* Workflow:
|
|
253
|
-
* - `kode deploy` or `kode deploy staging` → deploys to staging
|
|
254
|
-
* - `kode deploy production` or `kode deploy --promote` → promotes staging to production
|
|
255
|
-
* - `kode deploy --force` → force release stale lock before deploying
|
|
256
|
-
*/
|
|
257
290
|
declare function deployCommand(environment?: 'staging' | 'production', options?: {
|
|
258
291
|
promote?: boolean;
|
|
259
292
|
force?: boolean;
|
|
293
|
+
dryRun?: boolean;
|
|
260
294
|
}): Promise<void>;
|
|
261
295
|
|
|
262
296
|
/**
|
package/dist/index.js
CHANGED