@sandboxsonny/ace-kit 0.6.0 → 0.7.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @sandboxsonny/ace-kit
2
2
 
3
+ ## 0.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 98f4d58: The command line no longer shows where CMS Ace lives. `--help`, the messages and a new site's `.env.example` talk about CMS Ace, not an address, and connect to it without being told. `--api-url` and `ACE_API_URL` still work for a CMS on your own machine; they are just not advertised (see CONTRIBUTING.md).
8
+
9
+ ## 0.7.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 909b1a1: Add `ace-kit doctor`: checks Node, that Ace Kit is installed, the CMS and site the settings point at, the login, the Pages content and the section types, and says what to do about each problem.
14
+ - 584dcb1: The React Router starter made by `ace-kit create` now has the hero, FAQ and gallery sections, like the Astro one, and its published date and button. `ace-kit sync`, `ace-kit doctor` and the dev server look for `*.schema.ts` files in `app/` as well as `src/`. The docs now say a React Router site needs an `index` route as well as the `*` route, because `*` doesn't match `/`.
15
+
3
16
  ## 0.6.0
4
17
 
5
18
  ### Minor Changes
package/README.md CHANGED
@@ -58,7 +58,7 @@ const about = await getEntry("pages", "about");
58
58
  | [API reference](docs/api-reference.md) | Every export |
59
59
  | [Releasing](docs/releasing.md) | Versions, the changelog and publishing |
60
60
 
61
- The same pages, with live examples of the React components, are in Storybook: `npm run storybook`.
61
+ The same pages, with live examples of the React components, are in Storybook: **https://sandboxsonny.github.io/ace-kit/** (or `npm run storybook` to run it yourself).
62
62
 
63
63
  ## Status
64
64
 
@@ -1,4 +1,4 @@
1
- import { startDevSite, sectionSync } from './chunk-G5FGBOFT.js';
1
+ import { startDevSite, sectionSync } from './chunk-2W2NWDKV.js';
2
2
  import { domainFromSite, hostedAdminOrigin, hostedApiUrl } from './chunk-N5DIMG3X.js';
3
3
  import { envField } from 'astro/config';
4
4
  import { fileURLToPath } from 'url';
@@ -140,6 +140,13 @@ async function chooseLoginStore(options) {
140
140
  return file;
141
141
  }
142
142
  }
143
+
144
+ // src/cli/api-url.ts
145
+ var cmsLabel = (apiUrl) => apiUrl === hostedApiUrl ? "CMS Ace" : apiUrl;
146
+ var loginCommandFor = (apiUrl) => apiUrl === hostedApiUrl ? "npx ace-kit login" : `npx ace-kit login --api-url ${apiUrl}`;
147
+ function isLocalApiUrl(apiUrl) {
148
+ return ["localhost", "127.0.0.1", "[::1]"].includes(new URL(apiUrl).hostname);
149
+ }
143
150
  var runCommand = (command, commandArguments, input) => new Promise((resolve, reject) => {
144
151
  const child = spawn(command, commandArguments, { stdio: ["pipe", "pipe", "ignore"] });
145
152
  let stdout = "";
@@ -236,11 +243,6 @@ async function resolveLogin(options) {
236
243
  return { token: stored.token, email: stored.email, source: options.store.description };
237
244
  }
238
245
 
239
- // src/cli/api-url.ts
240
- function isLocalApiUrl(apiUrl) {
241
- return ["localhost", "127.0.0.1", "[::1]"].includes(new URL(apiUrl).hostname);
242
- }
243
-
244
246
  // src/dev-site/prepare-dev-site.ts
245
247
  var off = ["false", "off", "no", "0"];
246
248
  var on = ["true", "on", "yes", "1"];
@@ -305,7 +307,7 @@ async function startDevSite(options) {
305
307
  return null;
306
308
  case "waiting-for-login":
307
309
  log.warn(
308
- `You are not signed in to ${outcome.apiUrl}, so this is showing the live site and section sync is off. Run: npx ace-kit login --api-url ${outcome.apiUrl}`
310
+ `You are not signed in to ${cmsLabel(outcome.apiUrl)}, so this is showing the live site and section sync is off. Run: ${loginCommandFor(outcome.apiUrl)}`
309
311
  );
310
312
  return null;
311
313
  case "problem":
@@ -351,8 +353,9 @@ var skippedFolders = /* @__PURE__ */ new Set([
351
353
  ".output",
352
354
  "coverage"
353
355
  ]);
354
- async function findSchemaFiles(root, folder = "src") {
355
- const start = join(root, folder);
356
+ var defaultSchemaFolders = ["src", "app"];
357
+ async function findSchemaFiles(root, folder) {
358
+ const folders = defaultSchemaFolders ;
356
359
  const found = [];
357
360
  async function walk(directory) {
358
361
  let entries;
@@ -370,7 +373,7 @@ async function findSchemaFiles(root, folder = "src") {
370
373
  }
371
374
  }
372
375
  }
373
- await walk(start);
376
+ for (const name of folders) await walk(join(root, name));
374
377
  return found.sort((first, second) => {
375
378
  const [firstName, secondName] = [relative(root, first), relative(root, second)];
376
379
  return firstName < secondName ? -1 : firstName > secondName ? 1 : 0;
package/dist/cli.js CHANGED
@@ -9,8 +9,8 @@ if (major < 22 || major === 22 && minor < 12) {
9
9
  process.exit(1);
10
10
  }
11
11
  try {
12
- const { createRealEnvironment } = await import("./environment-T5K5ZJ2M.js");
13
- const { runCli } = await import("./main-YRQQWLHX.js");
12
+ const { createRealEnvironment } = await import("./environment-TGMGSRJ3.js");
13
+ const { runCli } = await import("./main-IAQ2IL3M.js");
14
14
  const environment = await createRealEnvironment();
15
15
  process.exit(await runCli(process.argv.slice(2), environment));
16
16
  } catch (error) {
@@ -145,7 +145,7 @@ function createLastApiUrl(path) {
145
145
  }
146
146
 
147
147
  // src/cli/version.ts
148
- var aceKitVersion = true ? "0.6.0" : "development";
148
+ var aceKitVersion = true ? "0.7.1" : "development";
149
149
 
150
150
  // src/cli/environment.ts
151
151
  var runCommand = (command, commandArguments, input) => new Promise((resolve, reject) => {
@@ -201,6 +201,7 @@ async function createRealEnvironment() {
201
201
  platform,
202
202
  hostname: hostname(),
203
203
  version: aceKitVersion,
204
+ nodeVersion: process.versions.node,
204
205
  out: (text) => process.stdout.write(`${text}
205
206
  `),
206
207
  error: (text) => console.error(text),