zitejs 0.9.93 → 0.9.94

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.
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCaller = void 0;
4
+ var index_js_1 = require("../caller/index.js");
5
+ Object.defineProperty(exports, "createCaller", { enumerable: true, get: function () { return index_js_1.createCaller; } });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createTableClient = void 0;
4
+ var index_js_1 = require("../runtime/index.js");
5
+ Object.defineProperty(exports, "createTableClient", { enumerable: true, get: function () { return index_js_1.createTableClient; } });
@@ -83,8 +83,17 @@ function regenerateAppApiTs(appDir) {
83
83
  const apiDir = (0, path_1.join)("apps", appDir, "src", "api");
84
84
  if (!(0, fs_2.existsSync)(apiDir))
85
85
  return;
86
+ // Sorted because `readdir` order is unspecified — it is whatever the
87
+ // filesystem returns. `generateApiTs` emits one import, one type block and
88
+ // one `api` key per endpoint IN THIS ORDER, and those declarations are
89
+ // order-independent, so a reshuffle produces a byte-different file that
90
+ // compiles to an identical program. Git cannot tell that apart from a real
91
+ // change: the app lands in the rebuild set and rebuilds for nothing, and a
92
+ // genuine one-endpoint addition shows up as a rewrite of the whole file
93
+ // instead of a few added lines.
86
94
  const endpointFiles = (0, fs_2.readdirSync)(apiDir)
87
95
  .filter((f) => f.endsWith(".ts") || f.endsWith(".js"))
96
+ .sort()
88
97
  .map((f) => ({
89
98
  fileName: f,
90
99
  content: (0, fs_2.readFileSync)((0, path_1.join)(apiDir, f), "utf-8"),
@@ -86,8 +86,13 @@ function regenerateApiTs() {
86
86
  const apiDir = (0, path_1.join)("src", "api");
87
87
  if (!(0, fs_1.existsSync)(apiDir))
88
88
  return;
89
+ // Sorted for the same reason as the `generate` path: `generateApiTs` emits
90
+ // per-endpoint declarations in list order, `readdir` order is unspecified,
91
+ // and a reshuffle rewrites the file without changing the program. Both
92
+ // writers must agree, or `sync` and `generate` reorder each other's output.
89
93
  const endpointFiles = (0, fs_1.readdirSync)(apiDir)
90
94
  .filter((f) => f.endsWith(".ts") || f.endsWith(".js"))
95
+ .sort()
91
96
  .map((f) => ({
92
97
  fileName: f,
93
98
  content: (0, fs_1.readFileSync)((0, path_1.join)(apiDir, f), "utf-8"),
@@ -0,0 +1,2 @@
1
+ export { createCaller } from '../caller/index.js';
2
+ export type { EndpointConfig } from '../caller/index.js';
@@ -0,0 +1 @@
1
+ export { createCaller } from '../caller/index.js';
package/dist/esm/cli.js CHANGED
File without changes
@@ -0,0 +1,2 @@
1
+ export { createTableClient } from '../runtime/index.js';
2
+ export type { TableClient } from '../runtime/index.js';
@@ -0,0 +1 @@
1
+ export { createTableClient } from '../runtime/index.js';
@@ -79,8 +79,17 @@ function regenerateAppApiTs(appDir) {
79
79
  const apiDir = join("apps", appDir, "src", "api");
80
80
  if (!existsSync(apiDir))
81
81
  return;
82
+ // Sorted because `readdir` order is unspecified — it is whatever the
83
+ // filesystem returns. `generateApiTs` emits one import, one type block and
84
+ // one `api` key per endpoint IN THIS ORDER, and those declarations are
85
+ // order-independent, so a reshuffle produces a byte-different file that
86
+ // compiles to an identical program. Git cannot tell that apart from a real
87
+ // change: the app lands in the rebuild set and rebuilds for nothing, and a
88
+ // genuine one-endpoint addition shows up as a rewrite of the whole file
89
+ // instead of a few added lines.
82
90
  const endpointFiles = readdirSync(apiDir)
83
91
  .filter((f) => f.endsWith(".ts") || f.endsWith(".js"))
92
+ .sort()
84
93
  .map((f) => ({
85
94
  fileName: f,
86
95
  content: readFileSync(join(apiDir, f), "utf-8"),
@@ -68,8 +68,13 @@ export function regenerateApiTs() {
68
68
  const apiDir = join("src", "api");
69
69
  if (!existsSync(apiDir))
70
70
  return;
71
+ // Sorted for the same reason as the `generate` path: `generateApiTs` emits
72
+ // per-endpoint declarations in list order, `readdir` order is unspecified,
73
+ // and a reshuffle rewrites the file without changing the program. Both
74
+ // writers must agree, or `sync` and `generate` reorder each other's output.
71
75
  const endpointFiles = readdirSync(apiDir)
72
76
  .filter((f) => f.endsWith(".ts") || f.endsWith(".js"))
77
+ .sort()
73
78
  .map((f) => ({
74
79
  fileName: f,
75
80
  content: readFileSync(join(apiDir, f), "utf-8"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zitejs",
3
- "version": "0.9.93",
3
+ "version": "0.9.94",
4
4
  "description": "The Zite framework — build apps on Zite Database",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",