@curenorway/kode-cli 1.3.6 → 1.3.8
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-JJDHEHNA.js → chunk-EBZNCW34.js} +13 -20
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -384,10 +384,10 @@ Cure Kode is an **internal CDN tool by Cure Norway** for managing JavaScript/CSS
|
|
|
384
384
|
|
|
385
385
|
### CDN URL
|
|
386
386
|
|
|
387
|
-
Add this to Webflow \u2192 Project Settings \u2192 Custom Code \u2192
|
|
387
|
+
Add this to Webflow \u2192 Project Settings \u2192 Custom Code \u2192 Body Code (before \`</body>\`):
|
|
388
388
|
|
|
389
389
|
\`\`\`html
|
|
390
|
-
<script
|
|
390
|
+
<script defer src="https://app.cure.no/api/cdn/${slug}/init.js"></script>
|
|
391
391
|
\`\`\`
|
|
392
392
|
|
|
393
393
|
### Workflow
|
|
@@ -459,13 +459,13 @@ Cure Kode is an **internal CDN tool by Cure** for managing JavaScript/CSS on Web
|
|
|
459
459
|
|
|
460
460
|
## CDN URL (Add to Webflow)
|
|
461
461
|
|
|
462
|
-
Add this script tag to your Webflow site's **Custom Code** (Project Settings \u2192 Custom Code \u2192
|
|
462
|
+
Add this script tag to your Webflow site's **Custom Code** (Project Settings \u2192 Custom Code \u2192 Body Code, before \`</body>\`):
|
|
463
463
|
|
|
464
464
|
\`\`\`html
|
|
465
|
-
<script
|
|
465
|
+
<script defer src="https://app.cure.no/api/cdn/${slug}/init.js"></script>
|
|
466
466
|
\`\`\`
|
|
467
467
|
|
|
468
|
-
**Important**: Use \`
|
|
468
|
+
**Important**: Use \`defer\` to ensure DOM is ready before scripts run. The init.js automatically loads all your scripts.
|
|
469
469
|
|
|
470
470
|
## Commands
|
|
471
471
|
|
|
@@ -1392,8 +1392,8 @@ async function deployCommand(environment, options) {
|
|
|
1392
1392
|
console.log(chalk5.red("\u274C Could not read project configuration."));
|
|
1393
1393
|
return;
|
|
1394
1394
|
}
|
|
1395
|
-
const
|
|
1396
|
-
if (
|
|
1395
|
+
const shouldPromote = options?.promote || environment === "production";
|
|
1396
|
+
if (shouldPromote) {
|
|
1397
1397
|
const spinner2 = ora4("Promoting staging to production...").start();
|
|
1398
1398
|
try {
|
|
1399
1399
|
const client = createApiClient(config);
|
|
@@ -1414,11 +1414,11 @@ async function deployCommand(environment, options) {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
return;
|
|
1416
1416
|
}
|
|
1417
|
-
const spinner = ora4(
|
|
1417
|
+
const spinner = ora4("Deploying to staging...").start();
|
|
1418
1418
|
try {
|
|
1419
1419
|
const client = createApiClient(config);
|
|
1420
|
-
const deployment = await client.deploy(config.siteId,
|
|
1421
|
-
spinner.succeed(
|
|
1420
|
+
const deployment = await client.deploy(config.siteId, "staging");
|
|
1421
|
+
spinner.succeed("Deployed to staging");
|
|
1422
1422
|
console.log();
|
|
1423
1423
|
console.log(chalk5.dim("Deployment details:"));
|
|
1424
1424
|
console.log(chalk5.dim(` Version: ${deployment.version}`));
|
|
@@ -1428,14 +1428,7 @@ async function deployCommand(environment, options) {
|
|
|
1428
1428
|
console.log(chalk5.bold("CDN URL:"));
|
|
1429
1429
|
console.log(chalk5.cyan(` https://app.cure.no/api/cdn/${config.siteSlug}/init.js`));
|
|
1430
1430
|
console.log();
|
|
1431
|
-
|
|
1432
|
-
console.log(chalk5.cyan('\u{1F4A1} Tip: Use "kode deploy production" or "kode deploy --promote" to go live.'));
|
|
1433
|
-
} else {
|
|
1434
|
-
console.log(chalk5.green("\u2705 Changes are now live!"));
|
|
1435
|
-
console.log();
|
|
1436
|
-
console.log(chalk5.dim("Make sure this script tag is in your Webflow site:"));
|
|
1437
|
-
console.log(chalk5.dim(`<script async src="https://app.cure.no/api/cdn/${config.siteSlug}/init.js"></script>`));
|
|
1438
|
-
}
|
|
1431
|
+
console.log(chalk5.cyan('\u{1F4A1} Tip: Use "kode deploy production" to promote to production.'));
|
|
1439
1432
|
} catch (error) {
|
|
1440
1433
|
spinner.fail("Deployment failed");
|
|
1441
1434
|
console.error(chalk5.red("\nError:"), error.message || error);
|
|
@@ -1809,8 +1802,8 @@ async function statusCommand(options) {
|
|
|
1809
1802
|
console.log();
|
|
1810
1803
|
console.log(chalk7.cyan(` https://app.cure.no/api/cdn/${config.siteSlug}/init.js`));
|
|
1811
1804
|
console.log();
|
|
1812
|
-
console.log(chalk7.dim(" Add to Webflow \u2192 Project Settings \u2192 Custom Code \u2192
|
|
1813
|
-
console.log(chalk7.dim(` <script
|
|
1805
|
+
console.log(chalk7.dim(" Add to Webflow \u2192 Project Settings \u2192 Custom Code \u2192 Body (before </body>):"));
|
|
1806
|
+
console.log(chalk7.dim(` <script defer src="https://app.cure.no/api/cdn/${config.siteSlug}/init.js"></script>`));
|
|
1814
1807
|
console.log();
|
|
1815
1808
|
const spinner = ora6("Fetching status...").start();
|
|
1816
1809
|
try {
|
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -199,6 +199,10 @@ declare function watchCommand(options: {
|
|
|
199
199
|
|
|
200
200
|
/**
|
|
201
201
|
* Deploy to staging or production
|
|
202
|
+
*
|
|
203
|
+
* Workflow:
|
|
204
|
+
* - `kode deploy` or `kode deploy staging` → deploys to staging
|
|
205
|
+
* - `kode deploy production` or `kode deploy --promote` → promotes staging to production
|
|
202
206
|
*/
|
|
203
207
|
declare function deployCommand(environment?: 'staging' | 'production', options?: {
|
|
204
208
|
promote?: boolean;
|
package/dist/index.js
CHANGED