@tenonhq/dovetail-servicenow 0.0.21 → 0.0.23

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.
@@ -5,7 +5,7 @@
5
5
  * live-validation caveat.
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.scrapeCk = exports.postForm = exports.parseFormInputs = exports.getNewRecordForm = exports.setCurrentApplication = exports.openFormSession = exports.resolveFormAuth = exports.TYPE_MAP = exports.listEditKey = exports.showInMenuKey = exports.defaultAccessFlags = exports.applyTableSaveOverlay = exports.resolveType = exports.normalizeColumns = exports.xmlEscape = exports.buildColumnXml = exports.DEFAULT_COLUMNS_REL_ID = exports.DEFAULT_SAVE_ACTION = exports.DEFAULT_SUPER_CLASS = exports.parseSysIdFromLocation = exports.projectTableGraph = exports.createTable = void 0;
8
+ exports.applyAddColumnOverlay = exports.deriveElement = exports.addColumn = exports.scrapeCk = exports.postForm = exports.parseFormInputs = exports.getNewRecordForm = exports.getRecordForm = exports.setCurrentApplication = exports.openFormSession = exports.resolveFormAuth = exports.TYPE_MAP = exports.listEditKey = exports.showInMenuKey = exports.defaultAccessFlags = exports.applyTableSaveOverlay = exports.resolveType = exports.normalizeColumns = exports.xmlEscape = exports.buildColumnXml = exports.DEFAULT_COLUMNS_REL_ID = exports.DEFAULT_SAVE_ACTION = exports.DEFAULT_SUPER_CLASS = exports.parseSysIdFromLocation = exports.projectTableGraph = exports.createTable = void 0;
9
9
  var createTable_1 = require("./createTable");
10
10
  Object.defineProperty(exports, "createTable", { enumerable: true, get: function () { return createTable_1.createTable; } });
11
11
  Object.defineProperty(exports, "projectTableGraph", { enumerable: true, get: function () { return createTable_1.projectTableGraph; } });
@@ -28,7 +28,12 @@ var formSession_1 = require("./formSession");
28
28
  Object.defineProperty(exports, "resolveFormAuth", { enumerable: true, get: function () { return formSession_1.resolveFormAuth; } });
29
29
  Object.defineProperty(exports, "openFormSession", { enumerable: true, get: function () { return formSession_1.openFormSession; } });
30
30
  Object.defineProperty(exports, "setCurrentApplication", { enumerable: true, get: function () { return formSession_1.setCurrentApplication; } });
31
+ Object.defineProperty(exports, "getRecordForm", { enumerable: true, get: function () { return formSession_1.getRecordForm; } });
31
32
  Object.defineProperty(exports, "getNewRecordForm", { enumerable: true, get: function () { return formSession_1.getNewRecordForm; } });
32
33
  Object.defineProperty(exports, "parseFormInputs", { enumerable: true, get: function () { return formSession_1.parseFormInputs; } });
33
34
  Object.defineProperty(exports, "postForm", { enumerable: true, get: function () { return formSession_1.postForm; } });
34
35
  Object.defineProperty(exports, "scrapeCk", { enumerable: true, get: function () { return formSession_1.scrapeCk; } });
36
+ var addColumn_1 = require("./addColumn");
37
+ Object.defineProperty(exports, "addColumn", { enumerable: true, get: function () { return addColumn_1.addColumn; } });
38
+ Object.defineProperty(exports, "deriveElement", { enumerable: true, get: function () { return addColumn_1.deriveElement; } });
39
+ Object.defineProperty(exports, "applyAddColumnOverlay", { enumerable: true, get: function () { return addColumn_1.applyAddColumnOverlay; } });
package/dist/types.d.ts CHANGED
@@ -179,3 +179,84 @@ export interface SetRelatedListsParams {
179
179
  /** Plan the writes without performing them. Defaults to false. */
180
180
  dryRun?: boolean;
181
181
  }
182
+ /** Role of a built chunk, inferred from its base name. Drives m2m chunk_role + load order. */
183
+ export type ChunkRole = "index" | "entry" | "vendor" | "router" | "state" | "lazy" | "style";
184
+ /**
185
+ * A classified build chunk — pure metadata, derived before any bytes are read.
186
+ * The carrier sys_ui_script is named `app_shell_asset:<viteRelPath>` (hash included),
187
+ * because the Scripted REST serving resource resolves an asset by that exact name.
188
+ */
189
+ export interface ChunkInfo {
190
+ /** Dist-relative path with forward slashes, e.g. "assets/index-a1b2c3d4.js" or "index.html". */
191
+ viteRelPath: string;
192
+ /** Carrier sys_ui_script name: "app_shell_asset:" + viteRelPath. Stable per build, rotates with the hash. */
193
+ name: string;
194
+ /** Filename only, e.g. "index-a1b2c3d4.js". */
195
+ fileName: string;
196
+ /** Hash-stripped base used only for role inference, e.g. "index". */
197
+ base: string;
198
+ /** Lowercased extension without the dot, e.g. "js". */
199
+ ext: string;
200
+ role: ChunkRole;
201
+ /** Gap-free load order across all chunks (ascending). */
202
+ order: number;
203
+ /** MIME type written to the attachment. */
204
+ contentType: string;
205
+ }
206
+ export interface HostAssetsParams {
207
+ /** Path to the pre-built dist/ directory. */
208
+ dir: string;
209
+ /** Application record sys_id (32 hex) — written verbatim to the m2m `application` field. */
210
+ app: string;
211
+ /** Scope namespace the carrier records live in, e.g. "x_cadso_app_shell". */
212
+ scope: string;
213
+ /** Update set sys_id that captures every metadata write. Resolved from the scope's current update set when omitted. */
214
+ updateSetSysId?: string;
215
+ /**
216
+ * Max bytes per chunk. The serving layer streams each chunk via
217
+ * GlideSysAttachment.getContentStream(), capped by glide.scriptable.excel.max_file_size
218
+ * (~5 MB) — a larger chunk truncates on serve. Defaults to 5 * 1024 * 1024.
219
+ */
220
+ maxBytes?: number;
221
+ /** Warn instead of failing when a chunk meets/exceeds maxBytes. Defaults to false (fail). */
222
+ allowOversize?: boolean;
223
+ /** Plan the deploy (read + classify) without writing/uploading/pruning. Defaults to false. */
224
+ dryRun?: boolean;
225
+ }
226
+ export interface ChunkResult {
227
+ /** Carrier sys_ui_script name ("app_shell_asset:<viteRelPath>"). */
228
+ name: string;
229
+ viteRelPath: string;
230
+ base: string;
231
+ role: ChunkRole;
232
+ order: number;
233
+ contentType: string;
234
+ bytes: number;
235
+ scriptSysId: string;
236
+ scriptAction: "created" | "updated" | "unchanged";
237
+ attachmentSysId: string;
238
+ attachmentAction: "uploaded" | "replaced" | "unchanged";
239
+ m2mSysId: string;
240
+ m2mAction: "created" | "updated" | "unchanged";
241
+ /** True once the script record + an attachment were read back from the instance. */
242
+ verified: boolean;
243
+ }
244
+ export interface PrunedResult {
245
+ /** Carrier sys_ui_script name that was removed (or planned for removal). */
246
+ name: string;
247
+ scriptSysId: string;
248
+ m2mSysId: string;
249
+ /** False when the carrier script was kept because another app's m2m still references it. */
250
+ scriptDeleted: boolean;
251
+ }
252
+ export interface HostAssetsResult {
253
+ scope: string;
254
+ app: string;
255
+ updateSet: {
256
+ sysId: string;
257
+ name: string;
258
+ };
259
+ dryRun: boolean;
260
+ chunks: Array<ChunkResult>;
261
+ pruned: Array<PrunedResult>;
262
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenonhq/dovetail-servicenow",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },