@stryke/prisma-trpc-generator 0.13.88 → 0.13.90
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/_virtual/_rolldown/runtime.cjs +0 -2
- package/dist/{packages/env → env}/src/get-env-paths.cjs +1 -1
- package/dist/env/src/get-env-paths.mjs.map +1 -0
- package/dist/helpers.cjs +1 -1
- package/dist/helpers.mjs +1 -1
- package/dist/prisma-generator.cjs +4 -4
- package/dist/prisma-generator.mjs +3 -5
- package/dist/prisma-generator.mjs.map +1 -1
- package/dist/string-format/src/acronyms.mjs.map +1 -0
- package/dist/string-format/src/articles.mjs.map +1 -0
- package/dist/string-format/src/combine.mjs.map +1 -0
- package/dist/string-format/src/conjunctions.mjs.map +1 -0
- package/dist/string-format/src/decamelize.mjs.map +1 -0
- package/dist/string-format/src/format-special-cases.mjs.map +1 -0
- package/dist/string-format/src/lower-case-first.mjs.map +1 -0
- package/dist/string-format/src/prepositions.mjs.map +1 -0
- package/dist/string-format/src/special-cases.mjs.map +1 -0
- package/dist/string-format/src/title-case.mjs.map +1 -0
- package/dist/string-format/src/upper-case-first.mjs.map +1 -0
- package/dist/utils/get-jiti.cjs +1 -1
- package/dist/utils/get-jiti.mjs +1 -1
- package/dist/zod/model-helpers.cjs +1 -1
- package/dist/zod/model-helpers.mjs +1 -1
- package/dist/zod/transformer.cjs +2 -2
- package/dist/zod/transformer.mjs +2 -2
- package/package.json +47 -48
- package/dist/_virtual/_rolldown/runtime.mjs +0 -32
- package/dist/packages/env/src/get-env-paths.mjs.map +0 -1
- package/dist/packages/string-format/src/acronyms.mjs.map +0 -1
- package/dist/packages/string-format/src/articles.mjs.map +0 -1
- package/dist/packages/string-format/src/combine.mjs.map +0 -1
- package/dist/packages/string-format/src/conjunctions.mjs.map +0 -1
- package/dist/packages/string-format/src/decamelize.mjs.map +0 -1
- package/dist/packages/string-format/src/format-special-cases.mjs.map +0 -1
- package/dist/packages/string-format/src/lower-case-first.mjs.map +0 -1
- package/dist/packages/string-format/src/prepositions.mjs.map +0 -1
- package/dist/packages/string-format/src/special-cases.mjs.map +0 -1
- package/dist/packages/string-format/src/title-case.mjs.map +0 -1
- package/dist/packages/string-format/src/upper-case-first.mjs.map +0 -1
- /package/dist/{packages/env → env}/src/get-env-paths.mjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/acronyms.cjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/acronyms.mjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/articles.cjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/articles.mjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/combine.cjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/combine.mjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/conjunctions.cjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/conjunctions.mjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/decamelize.cjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/decamelize.mjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/format-special-cases.cjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/format-special-cases.mjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/lower-case-first.cjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/lower-case-first.mjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/prepositions.cjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/prepositions.mjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/special-cases.cjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/special-cases.mjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/title-case.cjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/title-case.mjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/upper-case-first.cjs +0 -0
- /package/dist/{packages/string-format → string-format}/src/upper-case-first.mjs +0 -0
|
@@ -5,7 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
9
8
|
var __copyProps = (to, from, except, desc) => {
|
|
10
9
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
10
|
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
@@ -27,5 +26,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
26
|
|
|
28
27
|
//#endregion
|
|
29
28
|
|
|
30
|
-
exports.__commonJSMin = __commonJSMin;
|
|
31
29
|
exports.__toESM = __toESM;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_runtime = require('
|
|
1
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
2
2
|
const require_title_case = require('../../string-format/src/title-case.cjs');
|
|
3
3
|
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
4
4
|
let node_path = require("node:path");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-env-paths.mjs","names":[],"sources":["../../../../env/src/get-env-paths.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\n// Forked from https://www.npmjs.com/package/env-paths\n\nconst homedir = os.homedir();\nconst tmpdir = os.tmpdir();\n\n/**\n * Options for the `getEnvPaths` function.\n */\nexport interface GetEnvPathsOptions {\n /**\n * The name of the organization\n *\n * @defaultValue \"storm-software\"\n */\n orgId?: string;\n\n /**\n * The name of the specific application to use as a nested folder inside the organization's folder\n *\n * For example: `~/ ... /storm-software/Log/<appId>`\n */\n appId?: string;\n\n /**\n * The name of the specific application to use as a nested folder inside the organization's folder\n *\n * When a value is provided, it will use `~/ ... /storm-software/Log/<appId>/<nestedDir>`\n *\n * @remarks\n * If no child is provided, it will use `~/ ... /storm-software/Log/<appId>`\n */\n nestedDir?: string;\n\n /**\n * The suffix to append to the project name.\n *\n * @remarks\n * If `suffix` is `true`, the project name will be suffixed with `\"nodejs\"`.\n *\n * @defaultValue false\n */\n suffix?: string | boolean | null;\n\n /**\n * The root directory of the workspace that is used for determining the `cache` and `tmp` paths if they were not already set by other means.\n */\n workspaceRoot?: string;\n}\n\nexport interface EnvPaths {\n data: string;\n config: string;\n cache: string;\n log: string;\n temp: string;\n}\n\nconst macos = (orgId: string): EnvPaths => {\n const library = joinPaths(homedir, \"Library\");\n\n return {\n data: joinPaths(library, \"Application Support\", orgId),\n config: joinPaths(library, \"Preferences\", orgId),\n cache: joinPaths(library, \"Caches\", orgId),\n log: joinPaths(library, \"Logs\", orgId),\n temp: joinPaths(tmpdir, orgId)\n };\n};\n\nconst windows = (orgId: string): EnvPaths => {\n const appData =\n process.env.APPDATA || joinPaths(homedir, \"AppData\", \"Roaming\");\n const localAppData =\n process.env.LOCALAPPDATA || joinPaths(homedir, \"AppData\", \"Local\");\n\n const windowsFormattedOrgId = titleCase(orgId).trim().replace(/\\s+/g, \"\");\n\n return {\n // Data/config/cache/log are invented by me as Windows isn't opinionated about this\n data: joinPaths(localAppData, windowsFormattedOrgId, \"Data\"),\n config: joinPaths(appData, windowsFormattedOrgId, \"Config\"),\n cache: joinPaths(localAppData, \"Cache\", orgId),\n log: joinPaths(localAppData, windowsFormattedOrgId, \"Log\"),\n temp: joinPaths(tmpdir, orgId)\n };\n};\n\n// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html\nconst linux = (orgId: string): EnvPaths => {\n const username = path.basename(homedir);\n\n return {\n data: joinPaths(\n process.env.XDG_DATA_HOME || joinPaths(homedir, \".local\", \"share\"),\n orgId\n ),\n config: joinPaths(\n process.env.XDG_CONFIG_HOME || joinPaths(homedir, \".config\"),\n orgId\n ),\n cache: joinPaths(\n process.env.XDG_CACHE_HOME || joinPaths(homedir, \".cache\"),\n orgId\n ),\n // https://wiki.debian.org/XDGBaseDirectorySpecification#state\n log: joinPaths(\n process.env.XDG_STATE_HOME || joinPaths(homedir, \".local\", \"state\"),\n orgId\n ),\n // https://devenv.sh/files-and-variables/#devenv_root\n temp:\n process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR\n ? joinPaths(\n (process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR)!,\n orgId\n )\n : joinPaths(tmpdir, username, orgId)\n };\n};\n\n/**\n * Get paths for storing things like data, config, logs, and cache in the current runtime environment.\n *\n * @remarks\n * On macOS, directories are generally created in `~/Library/Application Support/<name>`.\n * On Windows, directories are generally created in `%AppData%/<name>`.\n * On Linux, directories are generally created in `~/.config/<name>` - this is determined via the [XDG Base Directory spec](https://specifications.freedesktop.org/basedir-spec/latest/).\n *\n * If the `STORM_DATA_DIR`, `STORM_CONFIG_DIR`, `STORM_CACHE_DIR`, `STORM_LOG_DIR`, or `STORM_TEMP_DIR` environment variables are set, they will be used instead of the default paths.\n *\n * @param options - Parameters used to determine the specific paths for the current project/runtime environment\n * @returns An object containing the various paths for the runtime environment\n */\nexport function getEnvPaths(options: GetEnvPathsOptions = {}): EnvPaths {\n let orgId = options.orgId || \"storm-software\";\n if (!orgId) {\n throw new Error(\n \"You need to provide an orgId to the `getEnvPaths` function\"\n );\n }\n\n if (options.suffix) {\n // Add suffix to prevent possible conflict with native apps\n orgId += `-${typeof options.suffix === \"string\" ? options.suffix : \"nodejs\"}`;\n }\n\n let result = {} as EnvPaths;\n\n if (process.platform === \"darwin\") {\n result = macos(orgId);\n } else if (process.platform === \"win32\") {\n result = windows(orgId);\n } else {\n result = linux(orgId);\n }\n\n if (process.env.STORM_DATA_DIR) {\n result.data = process.env.STORM_DATA_DIR;\n } else if (process.env.STORM_CONFIG_DIR) {\n result.config = process.env.STORM_CONFIG_DIR;\n } else if (process.env.STORM_CACHE_DIR) {\n result.cache = process.env.STORM_CACHE_DIR;\n } else if (process.env.STORM_LOG_DIR) {\n result.log = process.env.STORM_LOG_DIR;\n } else if (process.env.STORM_TEMP_DIR) {\n result.temp = process.env.STORM_TEMP_DIR;\n }\n\n if (options.workspaceRoot) {\n result.cache ??= joinPaths(\n options.workspaceRoot,\n \"node_modules\",\n \".cache\",\n orgId\n );\n result.temp ??= joinPaths(options.workspaceRoot, \"tmp\", orgId);\n result.log ??= joinPaths(result.temp, \"logs\");\n result.config ??= joinPaths(options.workspaceRoot, \".config\", orgId);\n }\n\n return Object.keys(result).reduce((ret, key) => {\n if (result[key as keyof EnvPaths]) {\n const filePath = result[key as keyof EnvPaths];\n\n ret[key as keyof EnvPaths] =\n options.appId &&\n options.appId !== options.orgId &&\n options.appId !== options.nestedDir\n ? joinPaths(filePath, options.appId)\n : filePath;\n\n if (\n options.nestedDir &&\n options.nestedDir !== options.orgId &&\n options.nestedDir !== options.appId\n ) {\n ret[key as keyof EnvPaths] = joinPaths(\n ret[key as keyof EnvPaths],\n options.nestedDir\n );\n }\n }\n\n return ret;\n }, {} as EnvPaths);\n}\n"],"mappings":";;;;;;AAyBA,MAAM,UAAU,GAAG,SAAS;AAC5B,MAAM,SAAS,GAAG,QAAQ;AAsD1B,MAAM,SAAS,UAA4B;CACzC,MAAM,UAAU,UAAU,SAAS,UAAU;AAE7C,QAAO;EACL,MAAM,UAAU,SAAS,uBAAuB,MAAM;EACtD,QAAQ,UAAU,SA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,IAAI,OAAO,QAAQ,WAAW,WAAW,QAAQ,SAAS;CAGrE,IAAI,SAAS,EAAE;AAEf,KAAI,QAAQ,aAAa,SACvB,UAAS,MAAM,MAAM;UACZ,QAAQ,aAAa,QAC9B,UAAS,QAAQ,MAAM;KAEvB,UAAS,MAAM,MAAM;AAGvB,KAAI,QAAQ,IAAI,eACd,QAAO,OAAO,QAAQ,IAAI;UACjB,QAAQ,IAAI,iBACrB,QAAO,SAAS,QAAQ,IAAI;UACnB,QAAQ,IAAI,gBACrB,QAAO,QAAQ,QAAQ,IAAI;UAClB,QAAQ,IAAI,cACrB,QAAO,MAAM,QAAQ,IAAI;UAChB,QAAQ,IAAI,eACrB,QAAO,OAAO,QAAQ,IAAI;AAG5B,KAAI,QAAQ,eAAe;AACzB,SAAO,UAAU,UACf,QAAQ,eACR,gBACA,UACA,MACD;AACD,SAAO,SAAS,UAAU,QAAQ,eAAe,OAAO,MAAM;AAC9D,SAAO,QAAQ,UAAU,OAAO,MAAM,OAAO;AAC7C,SAAO,WAAW,UAAU,QAAQ,eAAe,WAAW,MAAM;;AAGtE,QAAO,OAAO,KAAK,OAAO,CAAC,QAAQ,KAAK,QAAQ;AAC9C,MAAI,OAAO,MAAwB;GACjC,MAAM,WAAW,OAAO;AAExB,OAAI,OACF,QAAQ,SACR,QAAQ,UAAU,QAAQ,SAC1B,QAAQ,UAAU,QAAQ,YACtB,UAAU,UAAU,QAAQ,MAAM,GAClC;AAEN,OACE,QAAQ,aACR,QAAQ,cAAc,QAAQ,SAC9B,QAAQ,cAAc,QAAQ,MAE9B,KAAI,OAAyB,UAC3B,IAAI,MACJ,QAAQ,UACT;;AAIL,SAAO;IACN,EAAE,CAAa"}
|
package/dist/helpers.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
2
|
-
const require_lower_case_first = require('./
|
|
2
|
+
const require_lower_case_first = require('./string-format/src/lower-case-first.cjs');
|
|
3
3
|
const require_project = require('./project.cjs');
|
|
4
4
|
require('./utils/get-prisma-internals.cjs');
|
|
5
5
|
const require_model_helpers = require('./zod/model-helpers.cjs');
|
package/dist/helpers.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { lowerCaseFirst } from "./
|
|
1
|
+
import { lowerCaseFirst } from "./string-format/src/lower-case-first.mjs";
|
|
2
2
|
import { project } from "./project.mjs";
|
|
3
3
|
import "./utils/get-prisma-internals.mjs";
|
|
4
4
|
import { generateBarrelFile, populateModelFile } from "./zod/model-helpers.mjs";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
2
|
-
const require_lower_case_first = require('./
|
|
3
|
-
const require_pluralize$1 = require('./node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.cjs');
|
|
2
|
+
const require_lower_case_first = require('./string-format/src/lower-case-first.cjs');
|
|
4
3
|
const require_config = require('./config.cjs');
|
|
5
4
|
const require_project = require('./project.cjs');
|
|
6
5
|
const require_get_prisma_internals = require('./utils/get-prisma-internals.cjs');
|
|
@@ -16,9 +15,10 @@ let _stryke_fs_helpers = require("@stryke/fs/helpers");
|
|
|
16
15
|
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
17
16
|
let node_path = require("node:path");
|
|
18
17
|
node_path = require_runtime.__toESM(node_path, 1);
|
|
18
|
+
let pluralize = require("pluralize");
|
|
19
|
+
pluralize = require_runtime.__toESM(pluralize, 1);
|
|
19
20
|
|
|
20
21
|
//#region src/prisma-generator.ts
|
|
21
|
-
var import_pluralize = /* @__PURE__ */ require_runtime.__toESM(require_pluralize$1.default, 1);
|
|
22
22
|
async function generate(options) {
|
|
23
23
|
console.log("[STORM]: Running the Storm Software - Prisma tRPC generator \n");
|
|
24
24
|
const internals = await require_get_prisma_internals.getPrismaInternals();
|
|
@@ -143,7 +143,7 @@ async function generate(options) {
|
|
|
143
143
|
consoleLog(`Skipping model ${model} as it has no actions to generate`);
|
|
144
144
|
continue;
|
|
145
145
|
}
|
|
146
|
-
const plural = (0,
|
|
146
|
+
const plural = (0, pluralize.default)(require_lower_case_first.lowerCaseFirst(model));
|
|
147
147
|
consoleLog(`Generating tRPC router for model ${model}`);
|
|
148
148
|
require_helpers.generateRouterImport(appRouter, plural, model);
|
|
149
149
|
const modelRouter = require_project.project.createSourceFile(node_path.default.resolve(outputDir, "routers", `${require_lower_case_first.lowerCaseFirst(model)}.router.ts`), void 0, { overwrite: true });
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { lowerCaseFirst } from "./packages/string-format/src/lower-case-first.mjs";
|
|
3
|
-
import { require_pluralize } from "./node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.mjs";
|
|
1
|
+
import { lowerCaseFirst } from "./string-format/src/lower-case-first.mjs";
|
|
4
2
|
import { configSchema } from "./config.mjs";
|
|
5
3
|
import { project } from "./project.mjs";
|
|
6
4
|
import { getPrismaInternals } from "./utils/get-prisma-internals.mjs";
|
|
@@ -15,9 +13,9 @@ import { existsSync } from "@stryke/fs/exists";
|
|
|
15
13
|
import { createDirectory, removeDirectory } from "@stryke/fs/helpers";
|
|
16
14
|
import { joinPaths } from "@stryke/path/join-paths";
|
|
17
15
|
import path from "node:path";
|
|
16
|
+
import pluralize from "pluralize";
|
|
18
17
|
|
|
19
18
|
//#region src/prisma-generator.ts
|
|
20
|
-
var import_pluralize = /* @__PURE__ */ __toESM(require_pluralize(), 1);
|
|
21
19
|
async function generate(options) {
|
|
22
20
|
console.log("[STORM]: Running the Storm Software - Prisma tRPC generator \n");
|
|
23
21
|
const internals = await getPrismaInternals();
|
|
@@ -142,7 +140,7 @@ async function generate(options) {
|
|
|
142
140
|
consoleLog(`Skipping model ${model} as it has no actions to generate`);
|
|
143
141
|
continue;
|
|
144
142
|
}
|
|
145
|
-
const plural = (
|
|
143
|
+
const plural = pluralize(lowerCaseFirst(model));
|
|
146
144
|
consoleLog(`Generating tRPC router for model ${model}`);
|
|
147
145
|
generateRouterImport(appRouter, plural, model);
|
|
148
146
|
const modelRouter = project.createSourceFile(path.resolve(outputDir, "routers", `${lowerCaseFirst(model)}.router.ts`), void 0, { overwrite: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prisma-generator.mjs","names":[],"sources":["../src/prisma-generator.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type {\n DMMF,\n EnvValue,\n GeneratorOptions\n} from \"@prisma/generator-helper\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { createDirectory, removeDirectory } from \"@stryke/fs/helpers\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { lowerCaseFirst } from \"@stryke/string-format/lower-case-first\";\nimport path from \"node:path\";\nimport pluralize from \"pluralize\";\nimport { configSchema } from \"./config\";\nimport {\n constructDefaultOptions,\n constructShield,\n constructZodModels,\n generateCreateRouterImport,\n generateProcedure,\n generateRouterImport,\n generateRouterSchemaImports,\n generateTRPCExports,\n getInputTypeByOpName,\n resolveModelsComments\n} from \"./helpers\";\nimport { project } from \"./project\";\nimport type { RootType, Writeable } from \"./types\";\nimport { getPrismaInternals } from \"./utils/get-prisma-internals\";\nimport { writeFileSafely } from \"./utils/write-file-safely\";\nimport { resolveZodAggregateOperationSupport } from \"./zod/aggregate-helpers\";\nimport {\n hideZodInputObjectTypesAndRelatedFields,\n resolveZodModelsComments\n} from \"./zod/comments-helpers\";\nimport {\n generateZodEnumSchemas,\n generateZodIndex,\n generateZodModelSchemas,\n generateZodObjectSchemas\n} from \"./zod/generator-helpers\";\nimport { addMissingZodInputObjectTypes } from \"./zod/helpers\";\nimport Transformer from \"./zod/transformer\";\n\nexport async function generate(options: GeneratorOptions) {\n // eslint-disable-next-line no-console\n console.log(\"[STORM]: Running the Storm Software - Prisma tRPC generator \\n\");\n\n const internals = await getPrismaInternals();\n\n // eslint-disable-next-line no-console\n console.log(`[STORM]: Validating configuration options \\n`);\n\n const outputDir = internals.parseEnvValue(\n options.generator.output as EnvValue\n );\n const results = await configSchema.safeParseAsync(options.generator.config);\n if (!results.success) {\n throw new Error(\"Invalid options passed\");\n }\n\n const config = results.data;\n const consoleLog = (message: string) => {\n if (config.debug) {\n // eslint-disable-next-line no-console\n console.log(`[STORM]: ${message} \\n`);\n }\n };\n\n consoleLog(`Using configuration parameters: \\n${JSON.stringify(config)}`);\n\n consoleLog(`Preparing output directory: ${outputDir}`);\n\n await removeDirectory(outputDir);\n await createDirectory(outputDir);\n\n consoleLog(\"Finding Prisma Client generator\");\n\n const prismaClientProvider = options.otherGenerators.find(\n it => internals.parseEnvValue(it.provider) === \"prisma-client-js\"\n );\n if (!prismaClientProvider) {\n throw new Error(\n \"No Prisma Client generator found. Please add `prisma-client-js` to your generator list.\"\n );\n }\n\n consoleLog(\"Generating Prisma Client DMMF\");\n\n const prismaClientDmmf = (await internals.getDMMF({\n datamodel: options.datamodel,\n previewFeatures: prismaClientProvider?.previewFeatures\n })) as Writeable<DMMF.Document>;\n\n const modelOperations = prismaClientDmmf.mappings\n .modelOperations as DMMF.ModelMapping[];\n const inputObjectTypes = prismaClientDmmf.schema.inputObjectTypes\n .prisma as DMMF.InputType[];\n const outputObjectTypes = prismaClientDmmf.schema.outputObjectTypes\n .prisma as DMMF.OutputType[];\n const enumTypes = prismaClientDmmf.schema.enumTypes;\n const models = prismaClientDmmf.datamodel.models as Writeable<DMMF.Model[]>;\n const hiddenModels: string[] = [];\n const hiddenFields: string[] = [];\n\n if (config.withZod !== false) {\n consoleLog(\"Generating Zod schemas\");\n\n const zodOutputPath = internals.parseEnvValue(options.generator.output!);\n\n await createDirectory(zodOutputPath);\n Transformer.setOutputPath(zodOutputPath);\n\n if (prismaClientProvider?.isCustomOutput) {\n Transformer.setPrismaClientOutputPath(\n prismaClientProvider.output?.value as string\n );\n }\n\n await constructZodModels(\n models,\n joinPaths(zodOutputPath, \"schemas\", \"models\"),\n config,\n options\n );\n\n resolveZodModelsComments(\n models,\n modelOperations,\n enumTypes,\n hiddenModels,\n hiddenFields\n );\n\n await generateZodEnumSchemas(enumTypes.prisma, enumTypes.model!);\n\n const dataSource = options.datasources?.[0];\n if (!dataSource) {\n throw new Error(\"No datasource found\");\n }\n\n const previewFeatures = prismaClientProvider?.previewFeatures;\n Transformer.provider = dataSource.provider;\n Transformer.previewFeatures = previewFeatures;\n\n addMissingZodInputObjectTypes(\n inputObjectTypes,\n outputObjectTypes,\n models,\n modelOperations,\n dataSource.provider,\n {\n isGenerateSelect: true,\n isGenerateInclude: true\n }\n );\n\n const aggregateOperationSupport =\n resolveZodAggregateOperationSupport(inputObjectTypes);\n\n hideZodInputObjectTypesAndRelatedFields(\n inputObjectTypes,\n hiddenModels,\n hiddenFields\n );\n\n await generateZodObjectSchemas(\n inputObjectTypes as Writeable<DMMF.InputType[]>\n );\n\n await generateZodModelSchemas(\n models,\n modelOperations,\n aggregateOperationSupport\n );\n await generateZodIndex();\n } else {\n consoleLog(\"Skipping Zod schemas generation\");\n }\n\n const queries: RootType = [];\n const mutations: RootType = [];\n const subscriptions: RootType = [];\n\n prismaClientDmmf.mappings.modelOperations.forEach(modelOperation => {\n const { model: _model, plural: _plural, ...operations } = modelOperation;\n for (const [opType, opNameWithModel] of Object.entries(operations)) {\n if (\n [\n \"findUnique\",\n \"findUniqueOrThrow\",\n \"findFirst\",\n \"findFirstOrThrow\",\n \"findRaw\",\n \"findMany\",\n \"aggregateRaw\",\n \"count\",\n \"aggregate\",\n \"groupBy\"\n ].includes(opType)\n ) {\n queries.push(opNameWithModel as string);\n }\n\n if (\n [\n \"createOne\",\n \"createMany\",\n \"createManyAndReturn\",\n \"deleteOne\",\n \"deleteMany\",\n \"updateOne\",\n \"updateMany\",\n \"updateManyAndReturn\",\n \"upsertOne\"\n ].includes(opType)\n ) {\n mutations.push(opNameWithModel as string);\n }\n }\n });\n\n queries.sort();\n mutations.sort();\n subscriptions.sort();\n\n if (\n config.withShield &&\n !(\n typeof config.withShield === \"string\" &&\n (existsSync(joinPaths(outputDir, config.withShield)) ||\n existsSync(joinPaths(outputDir, `./${config.withShield}.ts`)) ||\n existsSync(joinPaths(outputDir, config.withShield, \"./shield.ts\")))\n )\n ) {\n consoleLog(`Generating tRPC Shield source file to ${outputDir}`);\n await writeFileSafely(\n joinPaths(outputDir, \"./shield.ts\"),\n await constructShield(\n { queries, mutations, subscriptions },\n config,\n options,\n outputDir\n )\n );\n } else {\n consoleLog(\"Skipping tRPC Shield generation\");\n }\n\n consoleLog(`Generating tRPC source code for ${models.length} models`);\n\n if (config.trpcOptions && typeof config.trpcOptions === \"boolean\") {\n consoleLog(`Generating tRPC options source file to ${outputDir}`);\n\n await writeFileSafely(\n joinPaths(outputDir, \"./options.ts\"),\n constructDefaultOptions(config, options, outputDir)\n );\n }\n\n resolveModelsComments(models, hiddenModels);\n\n consoleLog(\"Generating tRPC export file\");\n const trpcExports = project.createSourceFile(\n path.resolve(outputDir, \"trpc.ts\"),\n undefined,\n { overwrite: true }\n );\n\n await generateTRPCExports(trpcExports, config, options, outputDir);\n\n consoleLog(\"Generating tRPC app router\");\n const appRouter = project.createSourceFile(\n path.resolve(outputDir, \"routers\", `index.ts`),\n undefined,\n { overwrite: true }\n );\n\n consoleLog(\"Generating tRPC router imports\");\n\n generateCreateRouterImport({\n sourceFile: appRouter\n });\n\n const routerStatements = [];\n\n for (const modelOperation of modelOperations) {\n const { model, ...operations } = modelOperation;\n if (hiddenModels.includes(model)) {\n consoleLog(`Skipping model ${model} as it is hidden`);\n continue;\n }\n if (!model) {\n consoleLog(`Skipping model ${model} as it is not defined`);\n continue;\n }\n\n const modelActions = Object.keys(operations).filter<DMMF.ModelAction>(\n (opType): opType is DMMF.ModelAction =>\n // eslint-disable-next-line unicorn/prefer-includes\n config.generateModelActions.some(\n generateModelAction =>\n generateModelAction === opType.replace(\"One\", \"\")\n )\n );\n if (!modelActions.length) {\n consoleLog(`Skipping model ${model} as it has no actions to generate`);\n continue;\n }\n\n const plural = pluralize(lowerCaseFirst(model));\n\n consoleLog(`Generating tRPC router for model ${model}`);\n\n generateRouterImport(appRouter, plural, model);\n const modelRouter = project.createSourceFile(\n path.resolve(outputDir, \"routers\", `${lowerCaseFirst(model)}.router.ts`),\n undefined,\n { overwrite: true }\n );\n\n generateCreateRouterImport({\n sourceFile: modelRouter,\n config\n });\n\n if (config.withZod) {\n consoleLog(\"Generating Zod schemas imports\");\n generateRouterSchemaImports(modelRouter, model, modelActions);\n }\n\n modelRouter.addStatements(/* ts */ `\n export const ${plural}Router = t.router({`);\n\n for (const opType of modelActions) {\n const opNameWithModel = operations[opType];\n if (opNameWithModel) {\n const baseOpType = opType.replace(\"OrThrow\", \"\");\n\n generateProcedure(\n modelRouter,\n opNameWithModel,\n getInputTypeByOpName(baseOpType, model)!,\n model,\n opType,\n baseOpType,\n config\n );\n }\n }\n\n modelRouter.addStatements(/* ts */ `\n })`);\n\n modelRouter.formatText({ indentSize: 2 });\n routerStatements.push(/* ts */ `\n ${lowerCaseFirst(model)}: ${plural}Router`);\n\n consoleLog(\n `Generated tRPC router for model ${model} with ${modelActions.length} actions`\n );\n }\n\n consoleLog(\"Generating tRPC app router\");\n\n appRouter.addStatements(/* ts */ `\nexport const appRouter = t.router({${routerStatements.join()}});\n\nexport type AppRouter = typeof appRouter;`);\n\n appRouter.formatText({ indentSize: 2 });\n\n consoleLog(\"Saving tRPC router source files to disk\");\n\n await project.save();\n\n consoleLog(\"Storm Software - Prisma tRPC generator completed successfully\");\n}\n"],"mappings":";;;;;;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AAe,MAAM,CAAC;AAE/C,aAAW,oCAAoC,QAAQ;AAEvD,uBAAqB,WAAW,QAAQ,MAAM;EAC9C,MAAM,cAAc,QAAQ,iBAC1B,KAAK,QAAQ,WAAW,WAAW,GAAG,eAAe,MAAM,CAAC,YAAY,EACxE,QACA,EAAE,WAAW,MAAM,CACpB;AAED,6BAA2B;GACzB,YAAY;GACZ;GACD,CAAC;AAEF,MAAI,OAAO,SAAS;AAClB,cAAW,iCAAiC;AAC5C,+BAA4B,aAAa,OAAO,aAAa;;AAG/D,cAAY,cAAuB;qBAClB,OAAO,qBAAqB;AAE7C,OAAK,MAAM,UAAU,cAAc;GACjC,MAAM,kBAAkB,WAAW;AACnC,OAAI,iBAAiB;IACnB,MAAM,aAAa,OAAO,QAAQ,WAAW,GAAG;AAEhD,sBACE,aACA,iBACA,qBAAqB,YAAY,MAAM,EACvC,OACA,QACA,YACA,OACD;;;AAIL,cAAY,cAAuB;QAC/B;AAEJ,cAAY,WAAW,EAAE,YAAY,GAAG,CAAC;AACzC,mBAAiB,KAAc;QAC3B,eAAe,MAAM,CAAC,IAAI,OAAO,QAAQ;AAE7C,aACE,mCAAmC,MAAM,QAAQ,aAAa,OAAO,UACtE;;AAGH,YAAW,6BAA6B;AAExC,WAAU,cAAuB;qCACE,iBAAiB,MAAM,CAAC;;2CAElB;AAEzC,WAAU,WAAW,EAAE,YAAY,GAAG,CAAC;AAEvC,YAAW,0CAA0C;AAErD,OAAM,QAAQ,MAAM;AAEpB,YAAW,gEAAgE"}
|
|
1
|
+
{"version":3,"file":"prisma-generator.mjs","names":[],"sources":["../src/prisma-generator.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type {\n DMMF,\n EnvValue,\n GeneratorOptions\n} from \"@prisma/generator-helper\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { createDirectory, removeDirectory } from \"@stryke/fs/helpers\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { lowerCaseFirst } from \"@stryke/string-format/lower-case-first\";\nimport path from \"node:path\";\nimport pluralize from \"pluralize\";\nimport { configSchema } from \"./config\";\nimport {\n constructDefaultOptions,\n constructShield,\n constructZodModels,\n generateCreateRouterImport,\n generateProcedure,\n generateRouterImport,\n generateRouterSchemaImports,\n generateTRPCExports,\n getInputTypeByOpName,\n resolveModelsComments\n} from \"./helpers\";\nimport { project } from \"./project\";\nimport type { RootType, Writeable } from \"./types\";\nimport { getPrismaInternals } from \"./utils/get-prisma-internals\";\nimport { writeFileSafely } from \"./utils/write-file-safely\";\nimport { resolveZodAggregateOperationSupport } from \"./zod/aggregate-helpers\";\nimport {\n hideZodInputObjectTypesAndRelatedFields,\n resolveZodModelsComments\n} from \"./zod/comments-helpers\";\nimport {\n generateZodEnumSchemas,\n generateZodIndex,\n generateZodModelSchemas,\n generateZodObjectSchemas\n} from \"./zod/generator-helpers\";\nimport { addMissingZodInputObjectTypes } from \"./zod/helpers\";\nimport Transformer from \"./zod/transformer\";\n\nexport async function generate(options: GeneratorOptions) {\n // eslint-disable-next-line no-console\n console.log(\"[STORM]: Running the Storm Software - Prisma tRPC generator \\n\");\n\n const internals = await getPrismaInternals();\n\n // eslint-disable-next-line no-console\n console.log(`[STORM]: Validating configuration options \\n`);\n\n const outputDir = internals.parseEnvValue(\n options.generator.output as EnvValue\n );\n const results = await configSchema.safeParseAsync(options.generator.config);\n if (!results.success) {\n throw new Error(\"Invalid options passed\");\n }\n\n const config = results.data;\n const consoleLog = (message: string) => {\n if (config.debug) {\n // eslint-disable-next-line no-console\n console.log(`[STORM]: ${message} \\n`);\n }\n };\n\n consoleLog(`Using configuration parameters: \\n${JSON.stringify(config)}`);\n\n consoleLog(`Preparing output directory: ${outputDir}`);\n\n await removeDirectory(outputDir);\n await createDirectory(outputDir);\n\n consoleLog(\"Finding Prisma Client generator\");\n\n const prismaClientProvider = options.otherGenerators.find(\n it => internals.parseEnvValue(it.provider) === \"prisma-client-js\"\n );\n if (!prismaClientProvider) {\n throw new Error(\n \"No Prisma Client generator found. Please add `prisma-client-js` to your generator list.\"\n );\n }\n\n consoleLog(\"Generating Prisma Client DMMF\");\n\n const prismaClientDmmf = (await internals.getDMMF({\n datamodel: options.datamodel,\n previewFeatures: prismaClientProvider?.previewFeatures\n })) as Writeable<DMMF.Document>;\n\n const modelOperations = prismaClientDmmf.mappings\n .modelOperations as DMMF.ModelMapping[];\n const inputObjectTypes = prismaClientDmmf.schema.inputObjectTypes\n .prisma as DMMF.InputType[];\n const outputObjectTypes = prismaClientDmmf.schema.outputObjectTypes\n .prisma as DMMF.OutputType[];\n const enumTypes = prismaClientDmmf.schema.enumTypes;\n const models = prismaClientDmmf.datamodel.models as Writeable<DMMF.Model[]>;\n const hiddenModels: string[] = [];\n const hiddenFields: string[] = [];\n\n if (config.withZod !== false) {\n consoleLog(\"Generating Zod schemas\");\n\n const zodOutputPath = internals.parseEnvValue(options.generator.output!);\n\n await createDirectory(zodOutputPath);\n Transformer.setOutputPath(zodOutputPath);\n\n if (prismaClientProvider?.isCustomOutput) {\n Transformer.setPrismaClientOutputPath(\n prismaClientProvider.output?.value as string\n );\n }\n\n await constructZodModels(\n models,\n joinPaths(zodOutputPath, \"schemas\", \"models\"),\n config,\n options\n );\n\n resolveZodModelsComments(\n models,\n modelOperations,\n enumTypes,\n hiddenModels,\n hiddenFields\n );\n\n await generateZodEnumSchemas(enumTypes.prisma, enumTypes.model!);\n\n const dataSource = options.datasources?.[0];\n if (!dataSource) {\n throw new Error(\"No datasource found\");\n }\n\n const previewFeatures = prismaClientProvider?.previewFeatures;\n Transformer.provider = dataSource.provider;\n Transformer.previewFeatures = previewFeatures;\n\n addMissingZodInputObjectTypes(\n inputObjectTypes,\n outputObjectTypes,\n models,\n modelOperations,\n dataSource.provider,\n {\n isGenerateSelect: true,\n isGenerateInclude: true\n }\n );\n\n const aggregateOperationSupport =\n resolveZodAggregateOperationSupport(inputObjectTypes);\n\n hideZodInputObjectTypesAndRelatedFields(\n inputObjectTypes,\n hiddenModels,\n hiddenFields\n );\n\n await generateZodObjectSchemas(\n inputObjectTypes as Writeable<DMMF.InputType[]>\n );\n\n await generateZodModelSchemas(\n models,\n modelOperations,\n aggregateOperationSupport\n );\n await generateZodIndex();\n } else {\n consoleLog(\"Skipping Zod schemas generation\");\n }\n\n const queries: RootType = [];\n const mutations: RootType = [];\n const subscriptions: RootType = [];\n\n prismaClientDmmf.mappings.modelOperations.forEach(modelOperation => {\n const { model: _model, plural: _plural, ...operations } = modelOperation;\n for (const [opType, opNameWithModel] of Object.entries(operations)) {\n if (\n [\n \"findUnique\",\n \"findUniqueOrThrow\",\n \"findFirst\",\n \"findFirstOrThrow\",\n \"findRaw\",\n \"findMany\",\n \"aggregateRaw\",\n \"count\",\n \"aggregate\",\n \"groupBy\"\n ].includes(opType)\n ) {\n queries.push(opNameWithModel as string);\n }\n\n if (\n [\n \"createOne\",\n \"createMany\",\n \"createManyAndReturn\",\n \"deleteOne\",\n \"deleteMany\",\n \"updateOne\",\n \"updateMany\",\n \"updateManyAndReturn\",\n \"upsertOne\"\n ].includes(opType)\n ) {\n mutations.push(opNameWithModel as string);\n }\n }\n });\n\n queries.sort();\n mutations.sort();\n subscriptions.sort();\n\n if (\n config.withShield &&\n !(\n typeof config.withShield === \"string\" &&\n (existsSync(joinPaths(outputDir, config.withShield)) ||\n existsSync(joinPaths(outputDir, `./${config.withShield}.ts`)) ||\n existsSync(joinPaths(outputDir, config.withShield, \"./shield.ts\")))\n )\n ) {\n consoleLog(`Generating tRPC Shield source file to ${outputDir}`);\n await writeFileSafely(\n joinPaths(outputDir, \"./shield.ts\"),\n await constructShield(\n { queries, mutations, subscriptions },\n config,\n options,\n outputDir\n )\n );\n } else {\n consoleLog(\"Skipping tRPC Shield generation\");\n }\n\n consoleLog(`Generating tRPC source code for ${models.length} models`);\n\n if (config.trpcOptions && typeof config.trpcOptions === \"boolean\") {\n consoleLog(`Generating tRPC options source file to ${outputDir}`);\n\n await writeFileSafely(\n joinPaths(outputDir, \"./options.ts\"),\n constructDefaultOptions(config, options, outputDir)\n );\n }\n\n resolveModelsComments(models, hiddenModels);\n\n consoleLog(\"Generating tRPC export file\");\n const trpcExports = project.createSourceFile(\n path.resolve(outputDir, \"trpc.ts\"),\n undefined,\n { overwrite: true }\n );\n\n await generateTRPCExports(trpcExports, config, options, outputDir);\n\n consoleLog(\"Generating tRPC app router\");\n const appRouter = project.createSourceFile(\n path.resolve(outputDir, \"routers\", `index.ts`),\n undefined,\n { overwrite: true }\n );\n\n consoleLog(\"Generating tRPC router imports\");\n\n generateCreateRouterImport({\n sourceFile: appRouter\n });\n\n const routerStatements = [];\n\n for (const modelOperation of modelOperations) {\n const { model, ...operations } = modelOperation;\n if (hiddenModels.includes(model)) {\n consoleLog(`Skipping model ${model} as it is hidden`);\n continue;\n }\n if (!model) {\n consoleLog(`Skipping model ${model} as it is not defined`);\n continue;\n }\n\n const modelActions = Object.keys(operations).filter<DMMF.ModelAction>(\n (opType): opType is DMMF.ModelAction =>\n // eslint-disable-next-line unicorn/prefer-includes\n config.generateModelActions.some(\n generateModelAction =>\n generateModelAction === opType.replace(\"One\", \"\")\n )\n );\n if (!modelActions.length) {\n consoleLog(`Skipping model ${model} as it has no actions to generate`);\n continue;\n }\n\n const plural = pluralize(lowerCaseFirst(model));\n\n consoleLog(`Generating tRPC router for model ${model}`);\n\n generateRouterImport(appRouter, plural, model);\n const modelRouter = project.createSourceFile(\n path.resolve(outputDir, \"routers\", `${lowerCaseFirst(model)}.router.ts`),\n undefined,\n { overwrite: true }\n );\n\n generateCreateRouterImport({\n sourceFile: modelRouter,\n config\n });\n\n if (config.withZod) {\n consoleLog(\"Generating Zod schemas imports\");\n generateRouterSchemaImports(modelRouter, model, modelActions);\n }\n\n modelRouter.addStatements(/* ts */ `\n export const ${plural}Router = t.router({`);\n\n for (const opType of modelActions) {\n const opNameWithModel = operations[opType];\n if (opNameWithModel) {\n const baseOpType = opType.replace(\"OrThrow\", \"\");\n\n generateProcedure(\n modelRouter,\n opNameWithModel,\n getInputTypeByOpName(baseOpType, model)!,\n model,\n opType,\n baseOpType,\n config\n );\n }\n }\n\n modelRouter.addStatements(/* ts */ `\n })`);\n\n modelRouter.formatText({ indentSize: 2 });\n routerStatements.push(/* ts */ `\n ${lowerCaseFirst(model)}: ${plural}Router`);\n\n consoleLog(\n `Generated tRPC router for model ${model} with ${modelActions.length} actions`\n );\n }\n\n consoleLog(\"Generating tRPC app router\");\n\n appRouter.addStatements(/* ts */ `\nexport const appRouter = t.router({${routerStatements.join()}});\n\nexport type AppRouter = typeof appRouter;`);\n\n appRouter.formatText({ indentSize: 2 });\n\n consoleLog(\"Saving tRPC router source files to disk\");\n\n await project.save();\n\n consoleLog(\"Storm Software - Prisma tRPC generator completed successfully\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA4DA,eAAsB,SAAS,SAA2B;AAExD,SAAQ,IAAI,iEAAiE;CAE7E,MAAM,YAAY,MAAM,oBAAoB;AAG5C,SAAQ,IAAI,+CAA+C;CAE3D,MAAM,YAAY,UAAU,cAC1B,QAAQ,UAAU,OACnB;CACD,MAAM,UAAU,MAAM,aAAa,eAAe,QAAQ,UAAU,OAAO;AAC3E,KAAI,CAAC,QAAQ,QACX,OAAM,IAAI,MAAM,yBAAyB;CAG3C,MAAM,SAAS,QAAQ;CACvB,MAAM,cAAc,YAAoB;AACtC,MAAI,OAAO,MAET,SAAQ,IAAI,YAAY,QAAQ,KAAK;;AAIzC,YAAW,qCAAqC,KAAK,UAAU,OAAO,GAAG;AAEzE,YAAW,+BAA+B,YAA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AQ,WAAW,GAAG;AAEhD,sBACE,aACA,iBACA,qBAAqB,YAAY,MAAM,EACvC,OACA,QACA,YACA,OACD;;;AAIL,cAAY,cAAuB;QAC/B;AAEJ,cAAY,WAAW,EAAE,YAAY,GAAG,CAAC;AACzC,mBAAiB,KAAc;QAC3B,eAAe,MAAM,CAAC,IAAI,OAAO,QAAQ;AAE7C,aACE,mCAAmC,MAAM,QAAQ,aAAa,OAAO,UACtE;;AAGH,YAAW,6BAA6B;AAExC,WAAU,cAAuB;qCACE,iBAAiB,MAAM,CAAC;;2CAElB;AAEzC,WAAU,WAAW,EAAE,YAAY,GAAG,CAAC;AAEvC,YAAW,0CAA0C;AAErD,OAAM,QAAQ,MAAM;AAEpB,YAAW,gEAAgE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acronyms.mjs","names":[],"sources":["../../../../string-format/src/acronyms.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * A running list of common acronyms and their meanings.\n *\n * @remarks\n * This list is not exhaustive and may be updated over time.\n */\nexport const ACRONYMS: Record<\n string,\n { description: string; display?: string }\n> = {\n \"2D\": { description: \"Two-Dimensional\", display: \"2d\" },\n \"3D\": { description: \"Three-Dimensional\", display: \"3d\" },\n \"4D\": { description: \"Four-Dimensional\", display: \"4d\" },\n \"5G\": { description: \"Fifth Generation (mobile networks)\" },\n \"6G\": { description: \"Sixth Generation (mobile networks)\" },\n \"7G\": { description: \"Seventh Generation (mobile networks)\" },\n \"8G\": { description: \"Eighth Generation (mobile networks)\" },\n ACID: { description: \"Atomicity, Consistency, Isolation, Durability\" },\n AITA: { description: \"Am I The Asshole\" },\n AES: { description: \"Advanced Encryption Standard\" },\n AI: { description: \"Artificial Intelligence\" },\n AJAX: { description: \"Asynchronous JavaScript and XML\" },\n API: { description: \"Application Programming Interface\" },\n AR: { description: \"Augmented Reality\" },\n ASCII: {\n description: \"American Standard Code for Information Interchange\"\n },\n ATF: { description: \"Bureau of Alcohol, Tobacco, Firearms and Explosives\" },\n ATM: { description: \"Automated Teller Machine\" },\n B2B: { description: \"Business to Business\" },\n B2C: { description: \"Business to Consumer\" },\n BATFE: {\n description: \"Bureau of Alcohol, Tobacco, Firearms and Explosives\"\n },\n BFF: { description: \"Best Friends Forever\" },\n BFFS: { description: \"Best Friends Forever (plural)\" },\n BI: { description: \"Business Intelligence\" },\n BIOS: { description: \"Basic Input/Output System\" },\n BGP: { description: \"Border Gateway Protocol\" },\n BOM: { description: \"Bill of Materials / Byte Order Mark\" },\n BSON: { description: \"Binary JSON\" },\n BYOD: { description: \"Bring Your Own Device\" },\n C2C: { description: \"Consumer to Consumer\" },\n CAGR: { description: \"Compound Annual Growth Rate\" },\n CAPTCHA: {\n description:\n \"Completely Automated Public Turing test to tell Computers and Humans Apart\"\n },\n CCTV: { description: \"Closed-Circuit Television\" },\n CD: { description: \"Continuous Delivery / Compact Disc\" },\n CDN: { description: \"Content Delivery Network\" },\n CDP: { description: \"Customer Data Platform\" },\n CDT: { description: \"Central Daylight Time\" },\n CIA: { description: \"Central Intelligence Agency\" },\n CI: { description: \"Continuous Integration\" },\n \"CI/CD\": { description: \"Continuous Integration/Continuous Delivery\" },\n CIAM: { description: \"Customer Identity and Access Management\" },\n CICD: {\n description: \"Continuous Integration Continuous Delivery\",\n display: \"CI/CD\"\n },\n CLI: { description: \"Command Line Interface\" },\n CMDB: { description: \"Configuration Management Database\" },\n CORS: { description: \"Cross-Origin Resource Sharing\" },\n CPA: { description: \"Certified Public Accountant\" },\n CPU: { description: \"Central Processing Unit\" },\n CRUD: { description: \"Create, Read, Update, Delete\" },\n CSR: {\n description: \"Certificate Signing Request / Corporate Social Responsibility\"\n },\n CSS: { description: \"Cascading Style Sheets\" },\n CST: { description: \"Central Standard Time\" },\n CTA: { description: \"Call To Action\" },\n CWD: { description: \"Current Working Directory\" },\n CX: { description: \"Customer Experience\" },\n DAG: { description: \"Directed Acyclic Graph\" },\n DBMS: { description: \"Database Management System\" },\n DDOS: { description: \"Distributed Denial of Service\", display: \"DDoS\" },\n DEA: { description: \"Drug Enforcement Administration\" },\n DEVENV: { description: \"Devenv\", display: \"Devenv\" },\n DEVOPS: { description: \"Development Operations\", display: \"DevOps\" },\n DHS: { description: \"Department of Homeland Security\" },\n DEST: { description: \"Destination\" },\n DESTDIR: { description: \"Destination Directory\" },\n DESTPATH: { description: \"Destination Path\" },\n DIRENV: { description: \"DirEnv\", display: \"DirEnv\" },\n DNC: { description: \"Democratic National Committee / Do Not Call\" },\n DNS: { description: \"Domain Name System\" },\n DNSSEC: { description: \"Domain Name System Security Extensions\" },\n DOD: { description: \"Department of Defense\", display: \"DoD\" },\n DOJ: { description: \"Department of Justice\", display: \"DoJ\" },\n DOM: { description: \"Document Object Model\" },\n DOT: { description: \"Department of Transportation\", display: \"DoT\" },\n DOTENV: { description: \"Dotenv (.env)\", display: \"Dotenv\" },\n DR: { description: \"Disaster Recovery\" },\n DRM: { description: \"Digital Rights Management\" },\n DSN: { description: \"Data Source Name\" },\n DWH: { description: \"Data Warehouse\" },\n E2E: { description: \"End to End\" },\n EAI: { description: \"Enterprise Application Integration\" },\n EDT: { description: \"Eastern Daylight Time\" },\n EEA: { description: \"European Economic Area\" },\n EKS: { description: \"Elastic Kubernetes Service\" },\n EOF: { description: \"End Of File\" },\n EOD: { description: \"End Of Day / Explosive Ordnance Disposal\" },\n EPA: { description: \"Environmental Protection Agency\" },\n ER: { description: \"Emergency Room / Entity Relationship\" },\n EST: { description: \"Eastern Standard Time\" },\n ETC: { description: \"Et Cetera\" },\n ETL: { description: \"Extract, Transform, Load\" },\n EULA: { description: \"End User License Agreement\" },\n FAAS: { description: \"Function as a Service\", display: \"FaaS\" },\n FAQ: { description: \"Frequently Asked Questions\", display: \"FAQs\" },\n FAQS: { description: \"Frequently Asked Questions\" },\n FBI: { description: \"Federal Bureau of Investigation\" },\n FCC: { description: \"Federal Communications Commission\" },\n FDA: { description: \"Food and Drug Administration\" },\n FIDO: { description: \"Fast IDentity Online\" },\n FLOTUS: { description: \"First Lady of the United States\" },\n FQDN: { description: \"Fully Qualified Domain Name\" },\n FTC: { description: \"Federal Trade Commission\" },\n FTP: { description: \"File Transfer Protocol\" },\n GC: { description: \"Garbage Collection\" },\n GCP: { description: \"Google Cloud Platform\" },\n GDPR: { description: \"General Data Protection Regulation\" },\n GMT: { description: \"Greenwich Mean Time\" },\n GOP: { description: \"Grand Old Party\" },\n GPU: { description: \"Graphics Processing Unit\" },\n GUID: { description: \"Globally Unique Identifier\" },\n GUI: { description: \"Graphical User Interface\" },\n GZIP: { description: \"GNU Zip\" },\n HCI: {\n description: \"Human Computer Interaction / Hyper-Converged Infrastructure\"\n },\n HDD: { description: \"Hard Disk Drive\" },\n HDFS: { description: \"Hadoop Distributed File System\" },\n HHS: { description: \"Health and Human Services\" },\n HIPAA: {\n description: \"Health Insurance Portability and Accountability Act\"\n },\n HMAC: { description: \"Hash-based Message Authentication Code\" },\n HOTP: { description: \"HMAC-based One-Time Password\" },\n HSM: { description: \"Hardware Security Module\" },\n HTML: { description: \"HyperText Markup Language\" },\n HTTP: { description: \"HyperText Transfer Protocol (HTTP)\" },\n \"HTTP/2\": { description: \"HyperText Transfer Protocol Version 2 (HTTP/2)\" },\n \"HTTP/2.0\": {\n description: \"HyperText Transfer Protocol Version 2 (HTTP/2)\",\n display: \"HTTP2\"\n },\n \"HTTP/3\": { description: \"HyperText Transfer Protocol Version 3 (HTTP/3)\" },\n \"HTTP/3.0\": {\n description: \"HyperText Transfer Protocol Version 3 (HTTP/3)\",\n display: \"HTTP3\"\n },\n HTTP2: {\n description: \"HyperText Transfer Protocol Version 2 (HTTP/2)\",\n display: \"HTTP2\"\n },\n \"HTTP2.0\": {\n description: \"HyperText Transfer Protocol Version 2 (HTTP/2)\",\n display: \"HTTP2\"\n },\n HTTP3: {\n description: \"HyperText Transfer Protocol Version 3 (HTTP/3)\",\n display: \"HTTP3\"\n },\n \"HTTP3.0\": {\n description: \"HyperText Transfer Protocol Version 3 (HTTP/3)\",\n display: \"HTTP3\"\n },\n HTTPS: { description: \"HyperText Transfer Protocol Secure (HTTPS)\" },\n \"HTTPS/2\": {\n description: \"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)\"\n },\n \"HTTPS/2.0\": {\n description: \"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)\",\n display: \"HTTPS2\"\n },\n \"HTTPS/3\": {\n description: \"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)\"\n },\n \"HTTPS/3.0\": {\n description: \"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)\",\n display: \"HTTPS3\"\n },\n HTTPS2: {\n description: \"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)\",\n display: \"HTTPS2\"\n },\n \"HTTPS2.0\": {\n description: \"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)\",\n display: \"HTTPS2\"\n },\n HTTPS3: {\n description: \"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)\",\n display: \"HTTPS3\"\n },\n \"HTTPS3.0\": {\n description: \"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)\",\n display: \"HTTPS3\"\n },\n IAAS: { description: \"Infrastructure as a Service\", display: \"IaaS\" },\n IAM: { description: \"Identity and Access Management\" },\n IAMM: { description: \"Identity and Access Management and Monitoring\" },\n IAMT: { description: \"Identity and Access Management Tool\" },\n ID: { description: \"Identifier\", display: \"Id\" },\n IFTTT: { description: \"If This Then That\" },\n IMAP: { description: \"Internet Message Access Protocol\" },\n IO: { description: \"Input/Output\" },\n IP: { description: \"Internet Protocol\" },\n IPFS: { description: \"InterPlanetary File System\" },\n IPS: { description: \"Intrusion Prevention System\" },\n ISO: { description: \"International Organization for Standardization\" },\n IQ: { description: \"Intelligence Quotient\", display: \"IQ\" },\n IOT: { description: \"Internet of Things\", display: \"IoT\" },\n JSON: { description: \"JavaScript Object Notation\" },\n JSONP: { description: \"JSON with Padding\" },\n JWT: { description: \"JSON Web Token\" },\n K8S: { description: \"Kubernetes\", display: \"K8s\" },\n KMS: { description: \"Key Management Service\" },\n KPI: { description: \"Key Performance Indicator\" },\n KV: { description: \"Key Value\" },\n LAN: { description: \"Local Area Network\" },\n LHS: { description: \"Left Hand Side\" },\n LPGA: { description: \"Ladies Professional Golf Association\" },\n LXC: { description: \"Linux Containers\" },\n MDT: { description: \"Mountain Daylight Time\" },\n MFA: { description: \"Multi-Factor Authentication\" },\n ML: { description: \"Machine Learning\" },\n MLB: { description: \"Major League Baseball\" },\n MLOps: { description: \"Machine Learning Operations\" },\n MPA: { description: \"Multi-Page Application\" },\n MST: { description: \"Mountain Standard Time\" },\n MVC: { description: \"Model View Controller\" },\n MVP: { description: \"Minimum Viable Product / Most Valuable Player\" },\n NAIA: { description: \"National Association of Intercollegiate Athletics\" },\n NAS: { description: \"Network Attached Storage\" },\n NASA: { description: \"National Aeronautics and Space Administration\" },\n NASCAR: { description: \"National Association for Stock Car Auto Racing\" },\n NAT: { description: \"Network Address Translation\" },\n NBA: { description: \"National Basketball Association\" },\n NCAA: { description: \"National Collegiate Athletic Association\" },\n NDA: { description: \"Non-Disclosure Agreement\" },\n NFS: { description: \"Network File System\" },\n NHL: { description: \"National Hockey League\" },\n NIST: { description: \"National Institute of Standards and Technology\" },\n NLP: { description: \"Natural Language Processing\" },\n NPS: { description: \"Net Promoter Score\" },\n NRA: { description: \"National Rifle Association\" },\n NSFW: { description: \"Not Safe For Work\" },\n NX: { description: \"Nx\", display: \"Nx\" },\n OCR: { description: \"Optical Character Recognition\" },\n OEM: { description: \"Original Equipment Manufacturer\" },\n OKR: { description: \"Objectives and Key Results\" },\n OLAP: { description: \"Online Analytical Processing\" },\n OLTP: { description: \"Online Transaction Processing\" },\n OOP: { description: \"Object Oriented Programming\" },\n ORM: { description: \"Object Relational Mapping\" },\n OS: { description: \"Operating System\" },\n OSINT: { description: \"Open Source Intelligence\" },\n OSS: { description: \"Open Source Software\" },\n OTP: { description: \"One-Time Password\" },\n P2P: { description: \"Peer to Peer\" },\n PAAS: { description: \"Platform as a Service\", display: \"PaaS\" },\n PCI: { description: \"Payment Card Industry\" },\n PDP: { description: \"Policy Decision Point / Product Detail Page\" },\n PDT: { description: \"Pacific Daylight Time\" },\n PGA: { description: \"Professional Golfers' Association\" },\n POTUS: { description: \"President of the United States\" },\n PP: { description: \"Pages / PayPal / Percentage Points\" },\n PST: { description: \"Pacific Standard Time\" },\n PTO: { description: \"Paid Time Off / Power Take-Off\" },\n PKI: { description: \"Public Key Infrastructure\" },\n PWA: { description: \"Progressive Web App\" },\n PX: { description: \"Pixel\" },\n QA: { description: \"Quality Assurance\" },\n R2: { description: \"R2\" },\n RAID: { description: \"Redundant Array of Independent Disks\" },\n RAM: { description: \"Random Access Memory\" },\n RDS: { description: \"Relational Database Service\" },\n REST: { description: \"Representational State Transfer\" },\n RHS: { description: \"Right Hand Side\" },\n ROI: { description: \"Return on Investment\" },\n RPC: { description: \"Remote Procedure Call\" },\n RPA: { description: \"Robotic Process Automation\" },\n RSC: { description: \"React Server Components\" },\n RSS: { description: \"Really Simple Syndication\" },\n RUM: { description: \"Real User Monitoring\" },\n S3: { description: \"Simple Storage Service (S3)\" },\n SAN: { description: \"Storage Area Network\" },\n SASE: { description: \"Secure Access Service Edge\" },\n SCOTUS: { description: \"Supreme Court of the United States\" },\n SDLC: { description: \"Software Development Life Cycle\" },\n SDK: { description: \"Software Development Kit\" },\n SEC: { description: \"Securities and Exchange Commission\" },\n SEO: { description: \"Search Engine Optimization\" },\n SFTP: {\n description: \"SSH File Transfer Protocol / Secure File Transfer Protocol\"\n },\n SIEM: { description: \"Security Information and Event Management\" },\n SLA: { description: \"Service Level Agreement\" },\n SMB: { description: \"Server Message Block / Small and Medium Business\" },\n SMTP: { description: \"Simple Mail Transfer Protocol\" },\n SOAP: { description: \"Simple Object Access Protocol\" },\n SOA: { description: \"Service Oriented Architecture\" },\n SOC: { description: \"Security Operations Center / System on Chip\" },\n SPA: { description: \"Single Page Application\" },\n SPDY: { description: 'Speedy (pronounced \"SPeeDY\")' },\n SPF: { description: \"Sender Policy Framework\" },\n SQL: { description: \"Structured Query Language\" },\n SRC: { description: \"Source\" },\n SRCDIR: { description: \"Source Directory\" },\n SRCPATH: { description: \"Source Path\" },\n SRV: { description: \"Service\" },\n SRE: { description: \"Site Reliability Engineering\" },\n SSH: { description: \"Secure Shell\" },\n SSDL: { description: \"Secure Software Development Lifecycle\" },\n SSG: { description: \"Static Site Generation\" },\n SSR: { description: \"Server Side Rendering\" },\n SSO: { description: \"Single Sign-On\" },\n SSL: { description: \"Secure Sockets Layer\" },\n TDD: { description: \"Test Driven Development\" },\n TLD: { description: \"Top Level Domain\" },\n TLS: { description: \"Transport Layer Security\" },\n \"TLS1.3\": { description: \"Transport Layer Security 1.3\" },\n TOR: { description: \"The Onion Router\" },\n TOTP: { description: \"Time-based One-Time Password\" },\n TRPC: { description: \"TypeScript Remote Procedure Call\" },\n TSA: { description: \"Transportation Security Administration\" },\n TSC: { description: \"TypeScript Compiler\" },\n TTL: { description: \"Time To Live\" },\n UDP: { description: \"User Datagram Protocol\" },\n UI: { description: \"User Interface\" },\n UID: { description: \"Unique Identifier\" },\n URI: { description: \"Uniform Resource Identifier\" },\n URL: { description: \"Uniform Resource Locator\" },\n USOPC: { description: \"United States Olympic & Paralympic Committee\" },\n USPS: { description: \"United States Postal Service\" },\n USTA: { description: \"United States Tennis Association\" },\n UTF: { description: \"Unicode Transformation Format\" },\n UTC: { description: \"Coordinated Universal Time\" },\n UUID: { description: \"Universally Unique Identifier\" },\n UX: { description: \"User Experience\" },\n VM: { description: \"Virtual Machine\" },\n VLAN: { description: \"Virtual Local Area Network\" },\n VPN: { description: \"Virtual Private Network\" },\n VPPA: { description: \"Video Privacy Protection Act\" },\n VR: { description: \"Virtual Reality\" },\n WAF: { description: \"Web Application Firewall\" },\n WAN: { description: \"Wide Area Network\" },\n WNBA: { description: \"Women's National Basketball Association\" },\n WLAN: { description: \"Wireless Local Area Network\" },\n WPA: { description: \"Wi-Fi Protected Access\" },\n WPA2: { description: \"Wi-Fi Protected Access II\" },\n WPA3: { description: \"Wi-Fi Protected Access III\" },\n WWW: { description: \"World Wide Web\" },\n WYSIWYG: { description: \"What You See Is What You Get\" },\n XACML: { description: \"eXtensible Access Control Markup Language\" },\n XDG: { description: \"Cross-Desktop Group\" },\n XML: { description: \"eXtensible Markup Language\" },\n XSRF: { description: \"Cross-Site Request Forgery\" },\n XSS: { description: \"Cross-Site Scripting\" },\n XR: { description: \"Extended Reality\" },\n YAML: { description: \"YAML Ain't Markup Language\" },\n YMCA: { description: \"Young Men's Christian Association\" },\n YWCA: { description: \"Young Women's Christian Association\" },\n ZTA: { description: \"Zero Trust Architecture\" }\n} as const;\n\nexport const ACRONYM_DISPLAY: Record<string, string> = Object.fromEntries(\n Object.entries(ACRONYMS).map(([key, value]) => [key, value.display ?? key])\n);\n\nexport const ACRONYM_DESCRIPTION: Record<string, string> = Object.fromEntries(\n Object.entries(ACRONYMS).map(([key, value]) => [key, value.description])\n);\n\nexport const ACRONYM_LIST: string[] = Object.keys(ACRONYMS);\n"],"mappings":";;;;;;;AAwBA,MAAa,WAGT;CACF,MAAM;EAAE,aAAa;EAAmB,SAAS;EAAM;CACvD,MAAM;EAAE,aAAa;EAAqB,SAAS;EAAM;CACzD,MAAM;EAAE,aAAa;EAAoB,SAAS;EAAM;CACxD,MAAM,EAAE,aAAa,sCAAsC;CAC3D,MAAM,EAAE,aAAa,sCAAsC;CAC3D,MAAM,EAAE,aAAa,wCAAwC;CAC7D,MAAM,EAAE,aAAa,uCAAuC;CAC5D,M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AO,QAAQ,SAAS,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC,KAAK,MAAM,WAAW,IAAI,CAAC,CAC5E;AAED,MAAa,sBAA8C,OAAO,YAChE,OAAO,QAAQ,SAAS,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC,KAAK,MAAM,YAAY,CAAC,CACzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"articles.mjs","names":[],"sources":["../../../../string-format/src/articles.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const ARTICLES = [\"a\", \"an\", \"the\"];\n"],"mappings":";AAkBA,MAAa,WAAW;CAAC;CAAK;CAAM;CAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combine.mjs","names":[],"sources":["../../../../string-format/src/combine.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Combine two strings with a space in between.\n *\n * @param acc - The accumulated string.\n * @param str - The string to add.\n * @returns The combined string.\n */\nexport function combine(acc: string, str: string): string {\n return `${acc} ${str}`;\n}\n"],"mappings":";;;;;;;;AAyBA,SAAgB,QAAQ,KAAa,KAAqB;AACxD,QAAO,GAAG,IAAI,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conjunctions.mjs","names":[],"sources":["../../../../string-format/src/conjunctions.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const CONJUNCTIONS = [\n \"and\",\n \"that\",\n \"but\",\n \"or\",\n \"as\",\n \"if\",\n \"when\",\n \"than\",\n \"because\",\n \"while\",\n \"where\",\n \"after\",\n \"so\",\n \"though\",\n \"since\",\n \"until\",\n \"whether\",\n \"before\",\n \"although\",\n \"nor\",\n \"like\",\n \"once\",\n \"unless\",\n \"now\",\n \"except\"\n];\n"],"mappings":";AAkBA,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decamelize.mjs","names":[],"sources":["../../../../string-format/src/decamelize.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Convert a camelCase or PascalCase string to a snake_case string.\n *\n * @param value - The camelCase or PascalCase string to convert.\n * @returns The converted snake_case string.\n */\nexport function decamelize(value: string): string {\n return value\n .replace(/([a-z\\d])([A-Z])/g, \"$1_$2\")\n .replace(/([A-Z]+)([A-Z][a-z\\d]+)/g, \"$1_$2\")\n .toLowerCase();\n}\n"],"mappings":";;;;;;;AAwBA,SAAgB,WAAW,OAAuB;AAChD,QAAO,MACJ,QAAQ,qBAAqB,QAAQ,CACrC,QAAQ,4BAA4B,QAAQ,CAC5C,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-special-cases.mjs","names":[],"sources":["../../../../string-format/src/format-special-cases.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ACRONYMS } from \"./acronyms\";\nimport { ARTICLES } from \"./articles\";\nimport { CONJUNCTIONS } from \"./conjunctions\";\nimport { PREPOSITIONS } from \"./prepositions\";\nimport { SPECIAL_CASES } from \"./special-cases\";\n\nexport interface FormatSpecialCasesOptions {\n /**\n * If true, use the descriptions from the acronym list instead of the display names.\n *\n * @defaultValue true\n */\n useDescriptions?: boolean;\n}\n\n/**\n * Handle special words in a title.\n *\n * @see https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case\n *\n * @param value - The word to handle\n * @param index - The index of the word in the title\n * @param words - The full title as an array of words\n * @returns The formatted word\n */\nexport function formatSpecialCases(\n value: string,\n index: number,\n words: string[],\n options?: FormatSpecialCasesOptions\n): string {\n const lowercaseStr = value.toLowerCase();\n const uppercaseStr = value.toUpperCase();\n\n for (const special of SPECIAL_CASES) {\n if (special.toLowerCase() === lowercaseStr) {\n return special;\n }\n }\n\n if (ACRONYMS[uppercaseStr]) {\n return options?.useDescriptions !== false\n ? ACRONYMS[uppercaseStr].description\n : ACRONYMS[uppercaseStr].display || uppercaseStr;\n }\n\n // If the word is the first word in the sentence, but it's not a specially\n // cased word or an acronym, return the capitalized string\n if (index === 0) {\n return value;\n }\n\n // If the word is the last word in the sentence, but it's not a specially\n // cased word or an acronym, return the capitalized string\n if (index === words.length - 1) {\n return value;\n }\n\n // Return the word capitalized if it's 4 characters or more\n if (value.length >= 4) {\n return value;\n }\n\n if (PREPOSITIONS.includes(lowercaseStr)) {\n return lowercaseStr;\n }\n if (CONJUNCTIONS.includes(lowercaseStr)) {\n return lowercaseStr;\n }\n if (ARTICLES.includes(lowercaseStr)) {\n return lowercaseStr;\n }\n\n return value;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA2CA,SAAgB,mBACd,OACA,OACA,OACA,SACQ;CACR,MAAM,eAAe,MAAM,aAAa;CACxC,MAAM,eAAe,MAAM,aAAa;AAExC,MAAK,MAAM,WAAW,cACpB,KAAI,QAAQ,aAAa,KAAK,aAC5B,QAAO;AAIX,KAAI,SAAS,cACX,QAAO,SAAS,oBAAoB,QAChC,SAAS,cAAc,cACvB,SAAS,cAAc,WAAW;AAKxC,KAAI,UAAU,EACZ,QAAO;AAKT,KAAI,UAAU,MAAM,SAAS,EAC3B,QAAO;AAIT,KAAI,MAAM,UAAU,EAClB,QAAO;AAGT,KAAI,aAAa,SAAS,aAAa,CACrC,QAAO;AAET,KAAI,aAAa,SAAS,aAAa,CACrC,QAAO;AAET,KAAI,SAAS,SAAS,aAAa,CACjC,QAAO;AAGT,QAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lower-case-first.mjs","names":[],"sources":["../../../../string-format/src/lower-case-first.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Lower case the first character of an input string.\n *\n * @remarks\n * \"tHISISANEXAMPLE\"\n *\n * @param input - The input string.\n * @returns The lower-cased string.\n */\nexport function lowerCaseFirst<T extends string | undefined>(input?: T): T {\n return (input ? input.charAt(0).toLowerCase() + input.slice(1) : input) as T;\n}\n"],"mappings":";;;;;;;;;;AA2BA,SAAgB,eAA6C,OAAc;AACzE,QAAQ,QAAQ,MAAM,OAAO,EAAE,CAAC,aAAa,GAAG,MAAM,MAAM,EAAE,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepositions.mjs","names":[],"sources":["../../../../string-format/src/prepositions.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const PREPOSITIONS = [\n \"about\",\n \"above\",\n \"across\",\n \"after\",\n \"against\",\n \"along\",\n \"among\",\n \"around\",\n \"at\",\n \"because of\",\n \"before\",\n \"behind\",\n \"below\",\n \"beneath\",\n \"beside\",\n \"besides\",\n \"between\",\n \"beyond\",\n \"but\",\n \"by\",\n \"concerning\",\n \"despite\",\n \"down\",\n \"during\",\n \"except\",\n \"excepting\",\n \"for\",\n \"from\",\n \"in\",\n \"in front of\",\n \"inside\",\n \"in spite of\",\n \"instead of\",\n \"into\",\n \"like\",\n \"near\",\n \"of\",\n \"off\",\n \"on\",\n \"onto\",\n \"out\",\n \"outside\",\n \"over\",\n \"past\",\n \"regarding\",\n \"since\",\n \"through\",\n \"throughout\",\n \"to\",\n \"toward\",\n \"under\",\n \"underneath\",\n \"until\",\n \"up\",\n \"upon\",\n \"up to\",\n \"with\",\n \"within\",\n \"without\",\n \"with regard to\",\n \"with respect to\"\n];\n"],"mappings":";AAkBA,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"special-cases.mjs","names":[],"sources":["../../../../string-format/src/special-cases.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const SPECIAL_CASES = [\n \"2FA\",\n \"4K\",\n \"5K\",\n \"8K\",\n \"AGI\",\n \"BI\",\n \"ChatGPT\",\n \"CTA\",\n \"DateTime\",\n \"FMS\",\n \"GitHub\",\n \"GPT\",\n \"HD\",\n \"IBMid\",\n \"IDs\",\n \"iMac\",\n \"IMAX\",\n \"iOS\",\n \"iPad\",\n \"iPhone\",\n \"iPod\",\n \"LDAP\",\n \"LinkedIn\",\n \"LLM\",\n \"macOS\",\n \"McDonalds\",\n \"MCP\",\n \"ML\",\n \"MySQL\",\n \"NLG\",\n \"NLP\",\n \"NLU\",\n \"OpenAI\",\n \"PDFs\",\n \"PIM\",\n \"PEFT\",\n \"pH\",\n \"PostgreSQL\",\n \"SEO\",\n \"TTS\",\n \"UHD\",\n \"UUID\",\n \"XSS\",\n \"YouTube\",\n \"CSpell\",\n \"ESLint\"\n];\n"],"mappings":";AAkBA,MAAa,gBAAgB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title-case.mjs","names":[],"sources":["../../../../string-format/src/title-case.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ACRONYMS } from \"./acronyms\";\nimport { combine } from \"./combine\";\nimport { decamelize } from \"./decamelize\";\nimport type { FormatSpecialCasesOptions } from \"./format-special-cases\";\nimport { formatSpecialCases } from \"./format-special-cases\";\nimport { upperCaseFirst } from \"./upper-case-first\";\n\nexport interface TitleCaseOptions extends FormatSpecialCasesOptions {\n /**\n * Whether to expand acronyms in the input string.\n *\n * @remarks\n * If true, acronyms will be expanded to their full form before being converted to title case. For example, \"NASA\" would be expanded to \"National Aeronautics and Space Administration\".\n *\n * @defaultValue false\n */\n expandAcronyms?: boolean;\n}\n\n/**\n * Convert a string to title case.\n *\n * @param input - The input string to convert.\n * @param options - Options for formatting special cases.\n * @returns The title cased string.\n */\nexport function titleCase<T extends string | undefined>(\n input: T,\n options?: TitleCaseOptions\n): T {\n return input\n ?.replaceAll(\":\", \" - \")\n ?.replaceAll(\"+\", \" + \")\n ?.split(/\\s+-\\s+/)\n .map(segment =>\n decamelize(segment)\n .split(/[\\s\\-_]/)\n .map(upperCaseFirst)\n .map(value =>\n options?.expandAcronyms\n ? ACRONYMS[value]?.description || value\n : value\n )\n .map((value: string, index: number, array: string[]) =>\n formatSpecialCases(value, index, array, options)\n )\n .reduce(combine)\n )\n .join(\" - \") as T;\n}\n"],"mappings":";;;;;;;;;;;;;;AA4CA,SAAgB,UACd,OACA,SACG;AACH,QAAO,OACH,WAAW,KAAK,MAAM,EACtB,WAAW,KAAK,MAAM,EACtB,MAAM,UAAU,CACjB,KAAI,YACH,WAAW,QAAQ,CAChB,MAAM,UAAU,CAChB,IAAI,eAAe,CACnB,KAAI,UACH,SAAS,iBACL,SAAS,QAAQ,eAAe,QAChC,MACL,CACA,KAAK,OAAe,OAAe,UAClC,mBAAmB,OAAO,OAAO,OAAO,QAAQ,CACjD,CACA,OAAO,QAAQ,CACnB,CACA,KAAK,MAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upper-case-first.mjs","names":[],"sources":["../../../../string-format/src/upper-case-first.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Upper case the first character of an input string.\n *\n * @remarks\n * \"Thisisanexample\"\n *\n * @param input - The input string.\n * @returns The capitalized string.\n */\nexport function upperCaseFirst<T extends string | undefined>(input?: T): T {\n return (input ? input.charAt(0).toUpperCase() + input.slice(1) : input) as T;\n}\n"],"mappings":";;;;;;;;;;AA2BA,SAAgB,eAA6C,OAAc;AACzE,QAAQ,QAAQ,MAAM,OAAO,EAAE,CAAC,aAAa,GAAG,MAAM,MAAM,EAAE,GAAG"}
|
package/dist/utils/get-jiti.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
-
const require_get_env_paths = require('../
|
|
2
|
+
const require_get_env_paths = require('../env/src/get-env-paths.cjs');
|
|
3
3
|
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
4
4
|
let _stryke_fs_get_workspace_root = require("@stryke/fs/get-workspace-root");
|
|
5
5
|
let jiti = require("jiti");
|
package/dist/utils/get-jiti.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getEnvPaths } from "../
|
|
1
|
+
import { getEnvPaths } from "../env/src/get-env-paths.mjs";
|
|
2
2
|
import { joinPaths } from "@stryke/path/join-paths";
|
|
3
3
|
import { getWorkspaceRoot } from "@stryke/fs/get-workspace-root";
|
|
4
4
|
import { createJiti } from "jiti";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
-
const require_lower_case_first = require('../
|
|
2
|
+
const require_lower_case_first = require('../string-format/src/lower-case-first.cjs');
|
|
3
3
|
const require_get_prisma_internals = require('../utils/get-prisma-internals.cjs');
|
|
4
4
|
const require_docs_helpers = require('./docs-helpers.cjs');
|
|
5
5
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { lowerCaseFirst } from "../
|
|
1
|
+
import { lowerCaseFirst } from "../string-format/src/lower-case-first.mjs";
|
|
2
2
|
import { getPrismaInternals } from "../utils/get-prisma-internals.mjs";
|
|
3
3
|
import { getJSDocs, getZodDocElements } from "./docs-helpers.mjs";
|
|
4
4
|
import path from "node:path";
|
package/dist/zod/transformer.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
-
const require_lower_case_first = require('../
|
|
3
|
-
const require_upper_case_first = require('../
|
|
2
|
+
const require_lower_case_first = require('../string-format/src/lower-case-first.cjs');
|
|
3
|
+
const require_upper_case_first = require('../string-format/src/upper-case-first.cjs');
|
|
4
4
|
const require_model_helpers = require('./model-helpers.cjs');
|
|
5
5
|
const require_write_file_safely = require('../utils/write-file-safely.cjs');
|
|
6
6
|
const require_aggregate_helpers = require('./aggregate-helpers.cjs');
|
package/dist/zod/transformer.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { lowerCaseFirst } from "../
|
|
2
|
-
import { upperCaseFirst } from "../
|
|
1
|
+
import { lowerCaseFirst } from "../string-format/src/lower-case-first.mjs";
|
|
2
|
+
import { upperCaseFirst } from "../string-format/src/upper-case-first.mjs";
|
|
3
3
|
import { checkModelHasModelRelation, findModelByName } from "./model-helpers.mjs";
|
|
4
4
|
import { writeFileSafely, writeIndexFile } from "../utils/write-file-safely.mjs";
|
|
5
5
|
import { isAggregateInputType } from "./aggregate-helpers.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stryke/prisma-trpc-generator",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.90",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A fork of the prisma-trpc-generator code to work in ESM with Prisma v6.",
|
|
6
6
|
"keywords": [
|
|
@@ -52,6 +52,10 @@
|
|
|
52
52
|
"import": "./dist/config.mjs",
|
|
53
53
|
"require": "./dist/config.cjs"
|
|
54
54
|
},
|
|
55
|
+
"./env/src/get-env-paths": {
|
|
56
|
+
"import": "./dist/env/src/get-env-paths.mjs",
|
|
57
|
+
"require": "./dist/env/src/get-env-paths.cjs"
|
|
58
|
+
},
|
|
55
59
|
"./generator": {
|
|
56
60
|
"import": "./dist/generator.mjs",
|
|
57
61
|
"require": "./dist/generator.cjs"
|
|
@@ -60,61 +64,57 @@
|
|
|
60
64
|
"import": "./dist/helpers.mjs",
|
|
61
65
|
"require": "./dist/helpers.cjs"
|
|
62
66
|
},
|
|
63
|
-
"./
|
|
64
|
-
"import": "./dist/
|
|
65
|
-
"require": "./dist/
|
|
66
|
-
},
|
|
67
|
-
"./packages/string-format/src/acronyms": {
|
|
68
|
-
"import": "./dist/packages/string-format/src/acronyms.mjs",
|
|
69
|
-
"require": "./dist/packages/string-format/src/acronyms.cjs"
|
|
67
|
+
"./prisma-generator": {
|
|
68
|
+
"import": "./dist/prisma-generator.mjs",
|
|
69
|
+
"require": "./dist/prisma-generator.cjs"
|
|
70
70
|
},
|
|
71
|
-
"./
|
|
72
|
-
"import": "./dist/
|
|
73
|
-
"require": "./dist/
|
|
71
|
+
"./project": {
|
|
72
|
+
"import": "./dist/project.mjs",
|
|
73
|
+
"require": "./dist/project.cjs"
|
|
74
74
|
},
|
|
75
|
-
"./
|
|
76
|
-
"import": "./dist/
|
|
77
|
-
"require": "./dist/
|
|
75
|
+
"./string-format/src/acronyms": {
|
|
76
|
+
"import": "./dist/string-format/src/acronyms.mjs",
|
|
77
|
+
"require": "./dist/string-format/src/acronyms.cjs"
|
|
78
78
|
},
|
|
79
|
-
"./
|
|
80
|
-
"import": "./dist/
|
|
81
|
-
"require": "./dist/
|
|
79
|
+
"./string-format/src/articles": {
|
|
80
|
+
"import": "./dist/string-format/src/articles.mjs",
|
|
81
|
+
"require": "./dist/string-format/src/articles.cjs"
|
|
82
82
|
},
|
|
83
|
-
"./
|
|
84
|
-
"import": "./dist/
|
|
85
|
-
"require": "./dist/
|
|
83
|
+
"./string-format/src/combine": {
|
|
84
|
+
"import": "./dist/string-format/src/combine.mjs",
|
|
85
|
+
"require": "./dist/string-format/src/combine.cjs"
|
|
86
86
|
},
|
|
87
|
-
"./
|
|
88
|
-
"import": "./dist/
|
|
89
|
-
"require": "./dist/
|
|
87
|
+
"./string-format/src/conjunctions": {
|
|
88
|
+
"import": "./dist/string-format/src/conjunctions.mjs",
|
|
89
|
+
"require": "./dist/string-format/src/conjunctions.cjs"
|
|
90
90
|
},
|
|
91
|
-
"./
|
|
92
|
-
"import": "./dist/
|
|
93
|
-
"require": "./dist/
|
|
91
|
+
"./string-format/src/decamelize": {
|
|
92
|
+
"import": "./dist/string-format/src/decamelize.mjs",
|
|
93
|
+
"require": "./dist/string-format/src/decamelize.cjs"
|
|
94
94
|
},
|
|
95
|
-
"./
|
|
96
|
-
"import": "./dist/
|
|
97
|
-
"require": "./dist/
|
|
95
|
+
"./string-format/src/format-special-cases": {
|
|
96
|
+
"import": "./dist/string-format/src/format-special-cases.mjs",
|
|
97
|
+
"require": "./dist/string-format/src/format-special-cases.cjs"
|
|
98
98
|
},
|
|
99
|
-
"./
|
|
100
|
-
"import": "./dist/
|
|
101
|
-
"require": "./dist/
|
|
99
|
+
"./string-format/src/lower-case-first": {
|
|
100
|
+
"import": "./dist/string-format/src/lower-case-first.mjs",
|
|
101
|
+
"require": "./dist/string-format/src/lower-case-first.cjs"
|
|
102
102
|
},
|
|
103
|
-
"./
|
|
104
|
-
"import": "./dist/
|
|
105
|
-
"require": "./dist/
|
|
103
|
+
"./string-format/src/prepositions": {
|
|
104
|
+
"import": "./dist/string-format/src/prepositions.mjs",
|
|
105
|
+
"require": "./dist/string-format/src/prepositions.cjs"
|
|
106
106
|
},
|
|
107
|
-
"./
|
|
108
|
-
"import": "./dist/
|
|
109
|
-
"require": "./dist/
|
|
107
|
+
"./string-format/src/special-cases": {
|
|
108
|
+
"import": "./dist/string-format/src/special-cases.mjs",
|
|
109
|
+
"require": "./dist/string-format/src/special-cases.cjs"
|
|
110
110
|
},
|
|
111
|
-
"./
|
|
112
|
-
"import": "./dist/
|
|
113
|
-
"require": "./dist/
|
|
111
|
+
"./string-format/src/title-case": {
|
|
112
|
+
"import": "./dist/string-format/src/title-case.mjs",
|
|
113
|
+
"require": "./dist/string-format/src/title-case.cjs"
|
|
114
114
|
},
|
|
115
|
-
"./
|
|
116
|
-
"import": "./dist/
|
|
117
|
-
"require": "./dist/
|
|
115
|
+
"./string-format/src/upper-case-first": {
|
|
116
|
+
"import": "./dist/string-format/src/upper-case-first.mjs",
|
|
117
|
+
"require": "./dist/string-format/src/upper-case-first.cjs"
|
|
118
118
|
},
|
|
119
119
|
"./utils/format-file": {
|
|
120
120
|
"import": "./dist/utils/format-file.mjs",
|
|
@@ -194,8 +194,8 @@
|
|
|
194
194
|
"dependencies": {
|
|
195
195
|
"@prisma/generator-helper": "^6.19.3",
|
|
196
196
|
"@prisma/internals": "^6.19.3",
|
|
197
|
-
"@stryke/fs": "^0.33.
|
|
198
|
-
"@stryke/path": "^0.
|
|
197
|
+
"@stryke/fs": "^0.33.73",
|
|
198
|
+
"@stryke/path": "^0.29.1",
|
|
199
199
|
"esbuild": "^0.25.12",
|
|
200
200
|
"jiti": "^2.7.0",
|
|
201
201
|
"parenthesis": "^3.1.8",
|
|
@@ -209,6 +209,5 @@
|
|
|
209
209
|
"tsdown": "^0.21.10"
|
|
210
210
|
},
|
|
211
211
|
"publishConfig": { "access": "public" },
|
|
212
|
-
"
|
|
213
|
-
"gitHead": "b6886b6200909e934012026a76709bfeb90176dd"
|
|
212
|
+
"gitHead": "2ed697a18e476a0415c784f7e12e46770ea397e0"
|
|
214
213
|
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
|
|
3
|
-
//#region \0rolldown/runtime.js
|
|
4
|
-
var __create = Object.create;
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
14
|
-
key = keys[i];
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
16
|
-
__defProp(to, key, {
|
|
17
|
-
get: ((k) => from[k]).bind(null, key),
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return to;
|
|
24
|
-
};
|
|
25
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
-
value: mod,
|
|
27
|
-
enumerable: true
|
|
28
|
-
}) : target, mod));
|
|
29
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
export { __commonJSMin, __require, __toESM };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-env-paths.mjs","names":[],"sources":["../../../../../env/src/get-env-paths.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\n// Forked from https://www.npmjs.com/package/env-paths\n\nconst homedir = os.homedir();\nconst tmpdir = os.tmpdir();\n\n/**\n * Options for the `getEnvPaths` function.\n */\nexport interface GetEnvPathsOptions {\n /**\n * The name of the organization\n *\n * @defaultValue \"storm-software\"\n */\n orgId?: string;\n\n /**\n * The name of the specific application to use as a nested folder inside the organization's folder\n *\n * For example: `~/ ... /storm-software/Log/<appId>`\n */\n appId?: string;\n\n /**\n * The name of the specific application to use as a nested folder inside the organization's folder\n *\n * When a value is provided, it will use `~/ ... /storm-software/Log/<appId>/<nestedDir>`\n *\n * @remarks\n * If no child is provided, it will use `~/ ... /storm-software/Log/<appId>`\n */\n nestedDir?: string;\n\n /**\n * The suffix to append to the project name.\n *\n * @remarks\n * If `suffix` is `true`, the project name will be suffixed with `\"nodejs\"`.\n *\n * @defaultValue false\n */\n suffix?: string | boolean | null;\n\n /**\n * The root directory of the workspace that is used for determining the `cache` and `tmp` paths if they were not already set by other means.\n */\n workspaceRoot?: string;\n}\n\nexport interface EnvPaths {\n data: string;\n config: string;\n cache: string;\n log: string;\n temp: string;\n}\n\nconst macos = (orgId: string): EnvPaths => {\n const library = joinPaths(homedir, \"Library\");\n\n return {\n data: joinPaths(library, \"Application Support\", orgId),\n config: joinPaths(library, \"Preferences\", orgId),\n cache: joinPaths(library, \"Caches\", orgId),\n log: joinPaths(library, \"Logs\", orgId),\n temp: joinPaths(tmpdir, orgId)\n };\n};\n\nconst windows = (orgId: string): EnvPaths => {\n const appData =\n process.env.APPDATA || joinPaths(homedir, \"AppData\", \"Roaming\");\n const localAppData =\n process.env.LOCALAPPDATA || joinPaths(homedir, \"AppData\", \"Local\");\n\n const windowsFormattedOrgId = titleCase(orgId).trim().replace(/\\s+/g, \"\");\n\n return {\n // Data/config/cache/log are invented by me as Windows isn't opinionated about this\n data: joinPaths(localAppData, windowsFormattedOrgId, \"Data\"),\n config: joinPaths(appData, windowsFormattedOrgId, \"Config\"),\n cache: joinPaths(localAppData, \"Cache\", orgId),\n log: joinPaths(localAppData, windowsFormattedOrgId, \"Log\"),\n temp: joinPaths(tmpdir, orgId)\n };\n};\n\n// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html\nconst linux = (orgId: string): EnvPaths => {\n const username = path.basename(homedir);\n\n return {\n data: joinPaths(\n process.env.XDG_DATA_HOME || joinPaths(homedir, \".local\", \"share\"),\n orgId\n ),\n config: joinPaths(\n process.env.XDG_CONFIG_HOME || joinPaths(homedir, \".config\"),\n orgId\n ),\n cache: joinPaths(\n process.env.XDG_CACHE_HOME || joinPaths(homedir, \".cache\"),\n orgId\n ),\n // https://wiki.debian.org/XDGBaseDirectorySpecification#state\n log: joinPaths(\n process.env.XDG_STATE_HOME || joinPaths(homedir, \".local\", \"state\"),\n orgId\n ),\n // https://devenv.sh/files-and-variables/#devenv_root\n temp:\n process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR\n ? joinPaths(\n (process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR)!,\n orgId\n )\n : joinPaths(tmpdir, username, orgId)\n };\n};\n\n/**\n * Get paths for storing things like data, config, logs, and cache in the current runtime environment.\n *\n * @remarks\n * On macOS, directories are generally created in `~/Library/Application Support/<name>`.\n * On Windows, directories are generally created in `%AppData%/<name>`.\n * On Linux, directories are generally created in `~/.config/<name>` - this is determined via the [XDG Base Directory spec](https://specifications.freedesktop.org/basedir-spec/latest/).\n *\n * If the `STORM_DATA_DIR`, `STORM_CONFIG_DIR`, `STORM_CACHE_DIR`, `STORM_LOG_DIR`, or `STORM_TEMP_DIR` environment variables are set, they will be used instead of the default paths.\n *\n * @param options - Parameters used to determine the specific paths for the current project/runtime environment\n * @returns An object containing the various paths for the runtime environment\n */\nexport function getEnvPaths(options: GetEnvPathsOptions = {}): EnvPaths {\n let orgId = options.orgId || \"storm-software\";\n if (!orgId) {\n throw new Error(\n \"You need to provide an orgId to the `getEnvPaths` function\"\n );\n }\n\n if (options.suffix) {\n // Add suffix to prevent possible conflict with native apps\n orgId += `-${typeof options.suffix === \"string\" ? options.suffix : \"nodejs\"}`;\n }\n\n let result = {} as EnvPaths;\n\n if (process.platform === \"darwin\") {\n result = macos(orgId);\n } else if (process.platform === \"win32\") {\n result = windows(orgId);\n } else {\n result = linux(orgId);\n }\n\n if (process.env.STORM_DATA_DIR) {\n result.data = process.env.STORM_DATA_DIR;\n } else if (process.env.STORM_CONFIG_DIR) {\n result.config = process.env.STORM_CONFIG_DIR;\n } else if (process.env.STORM_CACHE_DIR) {\n result.cache = process.env.STORM_CACHE_DIR;\n } else if (process.env.STORM_LOG_DIR) {\n result.log = process.env.STORM_LOG_DIR;\n } else if (process.env.STORM_TEMP_DIR) {\n result.temp = process.env.STORM_TEMP_DIR;\n }\n\n if (options.workspaceRoot) {\n result.cache ??= joinPaths(\n options.workspaceRoot,\n \"node_modules\",\n \".cache\",\n orgId\n );\n result.temp ??= joinPaths(options.workspaceRoot, \"tmp\", orgId);\n result.log ??= joinPaths(result.temp, \"logs\");\n result.config ??= joinPaths(options.workspaceRoot, \".config\", orgId);\n }\n\n return Object.keys(result).reduce((ret, key) => {\n if (result[key as keyof EnvPaths]) {\n const filePath = result[key as keyof EnvPaths];\n\n ret[key as keyof EnvPaths] =\n options.appId &&\n options.appId !== options.orgId &&\n options.appId !== options.nestedDir\n ? joinPaths(filePath, options.appId)\n : filePath;\n\n if (\n options.nestedDir &&\n options.nestedDir !== options.orgId &&\n options.nestedDir !== options.appId\n ) {\n ret[key as keyof EnvPaths] = joinPaths(\n ret[key as keyof EnvPaths],\n options.nestedDir\n );\n }\n }\n\n return ret;\n }, {} as EnvPaths);\n}\n"],"mappings":";;;;;;AAyBA,MAAM,UAAU,GAAG,SAAS;AAC5B,MAAM,SAAS,GAAG,QAAQ;AAsD1B,MAAM,SAAS,UAA4B;CACzC,MAAM,UAAU,UAAU,SAAS,UAAU;AAE7C,QAAO;EACL,MAAM,UAAU,SAAS,uBAAuB,MAAM;EACtD,QAAQ,UAAU,SAAS,eAAe,MAAM;EAChD,OAAO,UAAU,SAAS,UAAU,MAAM;EAC1C,KAAK,UAAU,SAAS,QAAQ,MAAM;EACtC,MAAM,UAAU,QAAQ,MAAM;EAC/B;;AAGH,MAAM,WAAW,UAA4B;CAC3C,MAAM,UACJ,QAAQ,IAAI,WAAW,UAAU,SAAS,WAAW,UAAU;CACjE,MAAM,eACJ,QAAQ,IAAI,gBAAgB,UAAU,SAAS,WAAW,QAAQ;CAEpE,MAAM,wBAAwB,UAAU,MAAM,CAAC,MAAM,CAAC,QAAQ,QAAQ,GAAG;AAEzE,QAAO;EAEL,MAAM,UAAU,cAAc,uBAAuB,OAAO;EAC5D,QAAQ,UAAU,SAAS,uBAAuB,SAAS;EAC3D,OAAO,UAAU,cAAc,SAAS,MAAM;EAC9C,KAAK,UAAU,cAAc,uBAAuB,MAAM;EAC1D,MAAM,UAAU,QAAQ,MAAM;EAC/B;;AAIH,MAAM,SAAS,UAA4B;CACzC,MAAM,WAAW,KAAK,SAAS,QAAQ;AAEvC,QAAO;EACL,MAAM,UACJ,QAAQ,IAAI,iBAAiB,UAAU,SAAS,UAAU,QAAQ,EAClE,MACD;EACD,QAAQ,UACN,QAAQ,IAAI,mBAAmB,UAAU,SAAS,UAAU,EAC5D,MACD;EACD,O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AAI,OACF,QAAQ,SACR,QAAQ,UAAU,QAAQ,SAC1B,QAAQ,UAAU,QAAQ,YACtB,UAAU,UAAU,QAAQ,MAAM,GAClC;AAEN,OACE,QAAQ,aACR,QAAQ,cAAc,QAAQ,SAC9B,QAAQ,cAAc,QAAQ,MAE9B,KAAI,OAAyB,UAC3B,IAAI,MACJ,QAAQ,UACT;;AAIL,SAAO;IACN,EAAE,CAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acronyms.mjs","names":[],"sources":["../../../../../string-format/src/acronyms.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * A running list of common acronyms and their meanings.\n *\n * @remarks\n * This list is not exhaustive and may be updated over time.\n */\nexport const ACRONYMS: Record<\n string,\n { description: string; display?: string }\n> = {\n \"2D\": { description: \"Two-Dimensional\", display: \"2d\" },\n \"3D\": { description: \"Three-Dimensional\", display: \"3d\" },\n \"4D\": { description: \"Four-Dimensional\", display: \"4d\" },\n \"5G\": { description: \"Fifth Generation (mobile networks)\" },\n \"6G\": { description: \"Sixth Generation (mobile networks)\" },\n \"7G\": { description: \"Seventh Generation (mobile networks)\" },\n \"8G\": { description: \"Eighth Generation (mobile networks)\" },\n ACID: { description: \"Atomicity, Consistency, Isolation, Durability\" },\n AITA: { description: \"Am I The Asshole\" },\n AES: { description: \"Advanced Encryption Standard\" },\n AI: { description: \"Artificial Intelligence\" },\n AJAX: { description: \"Asynchronous JavaScript and XML\" },\n API: { description: \"Application Programming Interface\" },\n AR: { description: \"Augmented Reality\" },\n ASCII: {\n description: \"American Standard Code for Information Interchange\"\n },\n ATF: { description: \"Bureau of Alcohol, Tobacco, Firearms and Explosives\" },\n ATM: { description: \"Automated Teller Machine\" },\n B2B: { description: \"Business to Business\" },\n B2C: { description: \"Business to Consumer\" },\n BATFE: {\n description: \"Bureau of Alcohol, Tobacco, Firearms and Explosives\"\n },\n BFF: { description: \"Best Friends Forever\" },\n BFFS: { description: \"Best Friends Forever (plural)\" },\n BI: { description: \"Business Intelligence\" },\n BIOS: { description: \"Basic Input/Output System\" },\n BGP: { description: \"Border Gateway Protocol\" },\n BOM: { description: \"Bill of Materials / Byte Order Mark\" },\n BSON: { description: \"Binary JSON\" },\n BYOD: { description: \"Bring Your Own Device\" },\n C2C: { description: \"Consumer to Consumer\" },\n CAGR: { description: \"Compound Annual Growth Rate\" },\n CAPTCHA: {\n description:\n \"Completely Automated Public Turing test to tell Computers and Humans Apart\"\n },\n CCTV: { description: \"Closed-Circuit Television\" },\n CD: { description: \"Continuous Delivery / Compact Disc\" },\n CDN: { description: \"Content Delivery Network\" },\n CDP: { description: \"Customer Data Platform\" },\n CDT: { description: \"Central Daylight Time\" },\n CIA: { description: \"Central Intelligence Agency\" },\n CI: { description: \"Continuous Integration\" },\n \"CI/CD\": { description: \"Continuous Integration/Continuous Delivery\" },\n CIAM: { description: \"Customer Identity and Access Management\" },\n CICD: {\n description: \"Continuous Integration Continuous Delivery\",\n display: \"CI/CD\"\n },\n CLI: { description: \"Command Line Interface\" },\n CMDB: { description: \"Configuration Management Database\" },\n CORS: { description: \"Cross-Origin Resource Sharing\" },\n CPA: { description: \"Certified Public Accountant\" },\n CPU: { description: \"Central Processing Unit\" },\n CRUD: { description: \"Create, Read, Update, Delete\" },\n CSR: {\n description: \"Certificate Signing Request / Corporate Social Responsibility\"\n },\n CSS: { description: \"Cascading Style Sheets\" },\n CST: { description: \"Central Standard Time\" },\n CTA: { description: \"Call To Action\" },\n CWD: { description: \"Current Working Directory\" },\n CX: { description: \"Customer Experience\" },\n DAG: { description: \"Directed Acyclic Graph\" },\n DBMS: { description: \"Database Management System\" },\n DDOS: { description: \"Distributed Denial of Service\", display: \"DDoS\" },\n DEA: { description: \"Drug Enforcement Administration\" },\n DEVENV: { description: \"Devenv\", display: \"Devenv\" },\n DEVOPS: { description: \"Development Operations\", display: \"DevOps\" },\n DHS: { description: \"Department of Homeland Security\" },\n DEST: { description: \"Destination\" },\n DESTDIR: { description: \"Destination Directory\" },\n DESTPATH: { description: \"Destination Path\" },\n DIRENV: { description: \"DirEnv\", display: \"DirEnv\" },\n DNC: { description: \"Democratic National Committee / Do Not Call\" },\n DNS: { description: \"Domain Name System\" },\n DNSSEC: { description: \"Domain Name System Security Extensions\" },\n DOD: { description: \"Department of Defense\", display: \"DoD\" },\n DOJ: { description: \"Department of Justice\", display: \"DoJ\" },\n DOM: { description: \"Document Object Model\" },\n DOT: { description: \"Department of Transportation\", display: \"DoT\" },\n DOTENV: { description: \"Dotenv (.env)\", display: \"Dotenv\" },\n DR: { description: \"Disaster Recovery\" },\n DRM: { description: \"Digital Rights Management\" },\n DSN: { description: \"Data Source Name\" },\n DWH: { description: \"Data Warehouse\" },\n E2E: { description: \"End to End\" },\n EAI: { description: \"Enterprise Application Integration\" },\n EDT: { description: \"Eastern Daylight Time\" },\n EEA: { description: \"European Economic Area\" },\n EKS: { description: \"Elastic Kubernetes Service\" },\n EOF: { description: \"End Of File\" },\n EOD: { description: \"End Of Day / Explosive Ordnance Disposal\" },\n EPA: { description: \"Environmental Protection Agency\" },\n ER: { description: \"Emergency Room / Entity Relationship\" },\n EST: { description: \"Eastern Standard Time\" },\n ETC: { description: \"Et Cetera\" },\n ETL: { description: \"Extract, Transform, Load\" },\n EULA: { description: \"End User License Agreement\" },\n FAAS: { description: \"Function as a Service\", display: \"FaaS\" },\n FAQ: { description: \"Frequently Asked Questions\", display: \"FAQs\" },\n FAQS: { description: \"Frequently Asked Questions\" },\n FBI: { description: \"Federal Bureau of Investigation\" },\n FCC: { description: \"Federal Communications Commission\" },\n FDA: { description: \"Food and Drug Administration\" },\n FIDO: { description: \"Fast IDentity Online\" },\n FLOTUS: { description: \"First Lady of the United States\" },\n FQDN: { description: \"Fully Qualified Domain Name\" },\n FTC: { description: \"Federal Trade Commission\" },\n FTP: { description: \"File Transfer Protocol\" },\n GC: { description: \"Garbage Collection\" },\n GCP: { description: \"Google Cloud Platform\" },\n GDPR: { description: \"General Data Protection Regulation\" },\n GMT: { description: \"Greenwich Mean Time\" },\n GOP: { description: \"Grand Old Party\" },\n GPU: { description: \"Graphics Processing Unit\" },\n GUID: { description: \"Globally Unique Identifier\" },\n GUI: { description: \"Graphical User Interface\" },\n GZIP: { description: \"GNU Zip\" },\n HCI: {\n description: \"Human Computer Interaction / Hyper-Converged Infrastructure\"\n },\n HDD: { description: \"Hard Disk Drive\" },\n HDFS: { description: \"Hadoop Distributed File System\" },\n HHS: { description: \"Health and Human Services\" },\n HIPAA: {\n description: \"Health Insurance Portability and Accountability Act\"\n },\n HMAC: { description: \"Hash-based Message Authentication Code\" },\n HOTP: { description: \"HMAC-based One-Time Password\" },\n HSM: { description: \"Hardware Security Module\" },\n HTML: { description: \"HyperText Markup Language\" },\n HTTP: { description: \"HyperText Transfer Protocol (HTTP)\" },\n \"HTTP/2\": { description: \"HyperText Transfer Protocol Version 2 (HTTP/2)\" },\n \"HTTP/2.0\": {\n description: \"HyperText Transfer Protocol Version 2 (HTTP/2)\",\n display: \"HTTP2\"\n },\n \"HTTP/3\": { description: \"HyperText Transfer Protocol Version 3 (HTTP/3)\" },\n \"HTTP/3.0\": {\n description: \"HyperText Transfer Protocol Version 3 (HTTP/3)\",\n display: \"HTTP3\"\n },\n HTTP2: {\n description: \"HyperText Transfer Protocol Version 2 (HTTP/2)\",\n display: \"HTTP2\"\n },\n \"HTTP2.0\": {\n description: \"HyperText Transfer Protocol Version 2 (HTTP/2)\",\n display: \"HTTP2\"\n },\n HTTP3: {\n description: \"HyperText Transfer Protocol Version 3 (HTTP/3)\",\n display: \"HTTP3\"\n },\n \"HTTP3.0\": {\n description: \"HyperText Transfer Protocol Version 3 (HTTP/3)\",\n display: \"HTTP3\"\n },\n HTTPS: { description: \"HyperText Transfer Protocol Secure (HTTPS)\" },\n \"HTTPS/2\": {\n description: \"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)\"\n },\n \"HTTPS/2.0\": {\n description: \"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)\",\n display: \"HTTPS2\"\n },\n \"HTTPS/3\": {\n description: \"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)\"\n },\n \"HTTPS/3.0\": {\n description: \"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)\",\n display: \"HTTPS3\"\n },\n HTTPS2: {\n description: \"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)\",\n display: \"HTTPS2\"\n },\n \"HTTPS2.0\": {\n description: \"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)\",\n display: \"HTTPS2\"\n },\n HTTPS3: {\n description: \"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)\",\n display: \"HTTPS3\"\n },\n \"HTTPS3.0\": {\n description: \"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)\",\n display: \"HTTPS3\"\n },\n IAAS: { description: \"Infrastructure as a Service\", display: \"IaaS\" },\n IAM: { description: \"Identity and Access Management\" },\n IAMM: { description: \"Identity and Access Management and Monitoring\" },\n IAMT: { description: \"Identity and Access Management Tool\" },\n ID: { description: \"Identifier\", display: \"Id\" },\n IFTTT: { description: \"If This Then That\" },\n IMAP: { description: \"Internet Message Access Protocol\" },\n IO: { description: \"Input/Output\" },\n IP: { description: \"Internet Protocol\" },\n IPFS: { description: \"InterPlanetary File System\" },\n IPS: { description: \"Intrusion Prevention System\" },\n ISO: { description: \"International Organization for Standardization\" },\n IQ: { description: \"Intelligence Quotient\", display: \"IQ\" },\n IOT: { description: \"Internet of Things\", display: \"IoT\" },\n JSON: { description: \"JavaScript Object Notation\" },\n JSONP: { description: \"JSON with Padding\" },\n JWT: { description: \"JSON Web Token\" },\n K8S: { description: \"Kubernetes\", display: \"K8s\" },\n KMS: { description: \"Key Management Service\" },\n KPI: { description: \"Key Performance Indicator\" },\n KV: { description: \"Key Value\" },\n LAN: { description: \"Local Area Network\" },\n LHS: { description: \"Left Hand Side\" },\n LPGA: { description: \"Ladies Professional Golf Association\" },\n LXC: { description: \"Linux Containers\" },\n MDT: { description: \"Mountain Daylight Time\" },\n MFA: { description: \"Multi-Factor Authentication\" },\n ML: { description: \"Machine Learning\" },\n MLB: { description: \"Major League Baseball\" },\n MLOps: { description: \"Machine Learning Operations\" },\n MPA: { description: \"Multi-Page Application\" },\n MST: { description: \"Mountain Standard Time\" },\n MVC: { description: \"Model View Controller\" },\n MVP: { description: \"Minimum Viable Product / Most Valuable Player\" },\n NAIA: { description: \"National Association of Intercollegiate Athletics\" },\n NAS: { description: \"Network Attached Storage\" },\n NASA: { description: \"National Aeronautics and Space Administration\" },\n NASCAR: { description: \"National Association for Stock Car Auto Racing\" },\n NAT: { description: \"Network Address Translation\" },\n NBA: { description: \"National Basketball Association\" },\n NCAA: { description: \"National Collegiate Athletic Association\" },\n NDA: { description: \"Non-Disclosure Agreement\" },\n NFS: { description: \"Network File System\" },\n NHL: { description: \"National Hockey League\" },\n NIST: { description: \"National Institute of Standards and Technology\" },\n NLP: { description: \"Natural Language Processing\" },\n NPS: { description: \"Net Promoter Score\" },\n NRA: { description: \"National Rifle Association\" },\n NSFW: { description: \"Not Safe For Work\" },\n NX: { description: \"Nx\", display: \"Nx\" },\n OCR: { description: \"Optical Character Recognition\" },\n OEM: { description: \"Original Equipment Manufacturer\" },\n OKR: { description: \"Objectives and Key Results\" },\n OLAP: { description: \"Online Analytical Processing\" },\n OLTP: { description: \"Online Transaction Processing\" },\n OOP: { description: \"Object Oriented Programming\" },\n ORM: { description: \"Object Relational Mapping\" },\n OS: { description: \"Operating System\" },\n OSINT: { description: \"Open Source Intelligence\" },\n OSS: { description: \"Open Source Software\" },\n OTP: { description: \"One-Time Password\" },\n P2P: { description: \"Peer to Peer\" },\n PAAS: { description: \"Platform as a Service\", display: \"PaaS\" },\n PCI: { description: \"Payment Card Industry\" },\n PDP: { description: \"Policy Decision Point / Product Detail Page\" },\n PDT: { description: \"Pacific Daylight Time\" },\n PGA: { description: \"Professional Golfers' Association\" },\n POTUS: { description: \"President of the United States\" },\n PP: { description: \"Pages / PayPal / Percentage Points\" },\n PST: { description: \"Pacific Standard Time\" },\n PTO: { description: \"Paid Time Off / Power Take-Off\" },\n PKI: { description: \"Public Key Infrastructure\" },\n PWA: { description: \"Progressive Web App\" },\n PX: { description: \"Pixel\" },\n QA: { description: \"Quality Assurance\" },\n R2: { description: \"R2\" },\n RAID: { description: \"Redundant Array of Independent Disks\" },\n RAM: { description: \"Random Access Memory\" },\n RDS: { description: \"Relational Database Service\" },\n REST: { description: \"Representational State Transfer\" },\n RHS: { description: \"Right Hand Side\" },\n ROI: { description: \"Return on Investment\" },\n RPC: { description: \"Remote Procedure Call\" },\n RPA: { description: \"Robotic Process Automation\" },\n RSC: { description: \"React Server Components\" },\n RSS: { description: \"Really Simple Syndication\" },\n RUM: { description: \"Real User Monitoring\" },\n S3: { description: \"Simple Storage Service (S3)\" },\n SAN: { description: \"Storage Area Network\" },\n SASE: { description: \"Secure Access Service Edge\" },\n SCOTUS: { description: \"Supreme Court of the United States\" },\n SDLC: { description: \"Software Development Life Cycle\" },\n SDK: { description: \"Software Development Kit\" },\n SEC: { description: \"Securities and Exchange Commission\" },\n SEO: { description: \"Search Engine Optimization\" },\n SFTP: {\n description: \"SSH File Transfer Protocol / Secure File Transfer Protocol\"\n },\n SIEM: { description: \"Security Information and Event Management\" },\n SLA: { description: \"Service Level Agreement\" },\n SMB: { description: \"Server Message Block / Small and Medium Business\" },\n SMTP: { description: \"Simple Mail Transfer Protocol\" },\n SOAP: { description: \"Simple Object Access Protocol\" },\n SOA: { description: \"Service Oriented Architecture\" },\n SOC: { description: \"Security Operations Center / System on Chip\" },\n SPA: { description: \"Single Page Application\" },\n SPDY: { description: 'Speedy (pronounced \"SPeeDY\")' },\n SPF: { description: \"Sender Policy Framework\" },\n SQL: { description: \"Structured Query Language\" },\n SRC: { description: \"Source\" },\n SRCDIR: { description: \"Source Directory\" },\n SRCPATH: { description: \"Source Path\" },\n SRV: { description: \"Service\" },\n SRE: { description: \"Site Reliability Engineering\" },\n SSH: { description: \"Secure Shell\" },\n SSDL: { description: \"Secure Software Development Lifecycle\" },\n SSG: { description: \"Static Site Generation\" },\n SSR: { description: \"Server Side Rendering\" },\n SSO: { description: \"Single Sign-On\" },\n SSL: { description: \"Secure Sockets Layer\" },\n TDD: { description: \"Test Driven Development\" },\n TLD: { description: \"Top Level Domain\" },\n TLS: { description: \"Transport Layer Security\" },\n \"TLS1.3\": { description: \"Transport Layer Security 1.3\" },\n TOR: { description: \"The Onion Router\" },\n TOTP: { description: \"Time-based One-Time Password\" },\n TRPC: { description: \"TypeScript Remote Procedure Call\" },\n TSA: { description: \"Transportation Security Administration\" },\n TSC: { description: \"TypeScript Compiler\" },\n TTL: { description: \"Time To Live\" },\n UDP: { description: \"User Datagram Protocol\" },\n UI: { description: \"User Interface\" },\n UID: { description: \"Unique Identifier\" },\n URI: { description: \"Uniform Resource Identifier\" },\n URL: { description: \"Uniform Resource Locator\" },\n USOPC: { description: \"United States Olympic & Paralympic Committee\" },\n USPS: { description: \"United States Postal Service\" },\n USTA: { description: \"United States Tennis Association\" },\n UTF: { description: \"Unicode Transformation Format\" },\n UTC: { description: \"Coordinated Universal Time\" },\n UUID: { description: \"Universally Unique Identifier\" },\n UX: { description: \"User Experience\" },\n VM: { description: \"Virtual Machine\" },\n VLAN: { description: \"Virtual Local Area Network\" },\n VPN: { description: \"Virtual Private Network\" },\n VPPA: { description: \"Video Privacy Protection Act\" },\n VR: { description: \"Virtual Reality\" },\n WAF: { description: \"Web Application Firewall\" },\n WAN: { description: \"Wide Area Network\" },\n WNBA: { description: \"Women's National Basketball Association\" },\n WLAN: { description: \"Wireless Local Area Network\" },\n WPA: { description: \"Wi-Fi Protected Access\" },\n WPA2: { description: \"Wi-Fi Protected Access II\" },\n WPA3: { description: \"Wi-Fi Protected Access III\" },\n WWW: { description: \"World Wide Web\" },\n WYSIWYG: { description: \"What You See Is What You Get\" },\n XACML: { description: \"eXtensible Access Control Markup Language\" },\n XDG: { description: \"Cross-Desktop Group\" },\n XML: { description: \"eXtensible Markup Language\" },\n XSRF: { description: \"Cross-Site Request Forgery\" },\n XSS: { description: \"Cross-Site Scripting\" },\n XR: { description: \"Extended Reality\" },\n YAML: { description: \"YAML Ain't Markup Language\" },\n YMCA: { description: \"Young Men's Christian Association\" },\n YWCA: { description: \"Young Women's Christian Association\" },\n ZTA: { description: \"Zero Trust Architecture\" }\n} as const;\n\nexport const ACRONYM_DISPLAY: Record<string, string> = Object.fromEntries(\n Object.entries(ACRONYMS).map(([key, value]) => [key, value.display ?? key])\n);\n\nexport const ACRONYM_DESCRIPTION: Record<string, string> = Object.fromEntries(\n Object.entries(ACRONYMS).map(([key, value]) => [key, value.description])\n);\n\nexport const ACRONYM_LIST: string[] = Object.keys(ACRONYMS);\n"],"mappings":";;;;;;;AAwBA,MAAa,WAGT;CACF,MAAM;EAAE,aAAa;EAAmB,SAAS;EAAM;CACvD,MAAM;EAAE,aAAa;EAAqB,SAAS;EAAM;CACzD,MAAM;EAAE,aAAa;EAAoB,SAAS;EAAM;CACxD,MAAM,EAAE,aAAa,sCAAsC;CAC3D,MAAM,EAAE,aAAa,sCAAsC;CAC3D,MAAM,EAAE,aAAa,wCAAwC;CAC7D,MAAM,EAAE,aAAa,uCAAuC;CAC5D,MAAM,EAAE,aAAa,iDAAiD;CACtE,MAAM,EAAE,aAAa,oBAAoB;CACzC,KAAK,EAAE,aAAa,gCAAgC;CACpD,IAAI,EAAE,aAAa,2BAA2B;CAC9C,MAAM,EAAE,aAAa,mCAAmC;CACxD,KAAK,EAAE,aAAa,qCAAqC;CACzD,IAAI,E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ACzE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"articles.mjs","names":[],"sources":["../../../../../string-format/src/articles.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const ARTICLES = [\"a\", \"an\", \"the\"];\n"],"mappings":";AAkBA,MAAa,WAAW;CAAC;CAAK;CAAM;CAAM"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"combine.mjs","names":[],"sources":["../../../../../string-format/src/combine.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Combine two strings with a space in between.\n *\n * @param acc - The accumulated string.\n * @param str - The string to add.\n * @returns The combined string.\n */\nexport function combine(acc: string, str: string): string {\n return `${acc} ${str}`;\n}\n"],"mappings":";;;;;;;;AAyBA,SAAgB,QAAQ,KAAa,KAAqB;AACxD,QAAO,GAAG,IAAI,GAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conjunctions.mjs","names":[],"sources":["../../../../../string-format/src/conjunctions.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const CONJUNCTIONS = [\n \"and\",\n \"that\",\n \"but\",\n \"or\",\n \"as\",\n \"if\",\n \"when\",\n \"than\",\n \"because\",\n \"while\",\n \"where\",\n \"after\",\n \"so\",\n \"though\",\n \"since\",\n \"until\",\n \"whether\",\n \"before\",\n \"although\",\n \"nor\",\n \"like\",\n \"once\",\n \"unless\",\n \"now\",\n \"except\"\n];\n"],"mappings":";AAkBA,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decamelize.mjs","names":[],"sources":["../../../../../string-format/src/decamelize.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Convert a camelCase or PascalCase string to a snake_case string.\n *\n * @param value - The camelCase or PascalCase string to convert.\n * @returns The converted snake_case string.\n */\nexport function decamelize(value: string): string {\n return value\n .replace(/([a-z\\d])([A-Z])/g, \"$1_$2\")\n .replace(/([A-Z]+)([A-Z][a-z\\d]+)/g, \"$1_$2\")\n .toLowerCase();\n}\n"],"mappings":";;;;;;;AAwBA,SAAgB,WAAW,OAAuB;AAChD,QAAO,MACJ,QAAQ,qBAAqB,QAAQ,CACrC,QAAQ,4BAA4B,QAAQ,CAC5C,aAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-special-cases.mjs","names":[],"sources":["../../../../../string-format/src/format-special-cases.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ACRONYMS } from \"./acronyms\";\nimport { ARTICLES } from \"./articles\";\nimport { CONJUNCTIONS } from \"./conjunctions\";\nimport { PREPOSITIONS } from \"./prepositions\";\nimport { SPECIAL_CASES } from \"./special-cases\";\n\nexport interface FormatSpecialCasesOptions {\n /**\n * If true, use the descriptions from the acronym list instead of the display names.\n *\n * @defaultValue true\n */\n useDescriptions?: boolean;\n}\n\n/**\n * Handle special words in a title.\n *\n * @see https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case\n *\n * @param value - The word to handle\n * @param index - The index of the word in the title\n * @param words - The full title as an array of words\n * @returns The formatted word\n */\nexport function formatSpecialCases(\n value: string,\n index: number,\n words: string[],\n options?: FormatSpecialCasesOptions\n): string {\n const lowercaseStr = value.toLowerCase();\n const uppercaseStr = value.toUpperCase();\n\n for (const special of SPECIAL_CASES) {\n if (special.toLowerCase() === lowercaseStr) {\n return special;\n }\n }\n\n if (ACRONYMS[uppercaseStr]) {\n return options?.useDescriptions !== false\n ? ACRONYMS[uppercaseStr].description\n : ACRONYMS[uppercaseStr].display || uppercaseStr;\n }\n\n // If the word is the first word in the sentence, but it's not a specially\n // cased word or an acronym, return the capitalized string\n if (index === 0) {\n return value;\n }\n\n // If the word is the last word in the sentence, but it's not a specially\n // cased word or an acronym, return the capitalized string\n if (index === words.length - 1) {\n return value;\n }\n\n // Return the word capitalized if it's 4 characters or more\n if (value.length >= 4) {\n return value;\n }\n\n if (PREPOSITIONS.includes(lowercaseStr)) {\n return lowercaseStr;\n }\n if (CONJUNCTIONS.includes(lowercaseStr)) {\n return lowercaseStr;\n }\n if (ARTICLES.includes(lowercaseStr)) {\n return lowercaseStr;\n }\n\n return value;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA2CA,SAAgB,mBACd,OACA,OACA,OACA,SACQ;CACR,MAAM,eAAe,MAAM,aAAa;CACxC,MAAM,eAAe,MAAM,aAAa;AAExC,MAAK,MAAM,WAAW,cACpB,KAAI,QAAQ,aAAa,KAAK,aAC5B,QAAO;AAIX,KAAI,SAAS,cACX,QAAO,SAAS,oBAAoB,QAChC,SAAS,cAAc,cACvB,SAAS,cAAc,WAAW;AAKxC,KAAI,UAAU,EACZ,QAAO;AAKT,KAAI,UAAU,MAAM,SAAS,EAC3B,QAAO;AAIT,KAAI,MAAM,UAAU,EAClB,QAAO;AAGT,KAAI,aAAa,SAAS,aAAa,CACrC,QAAO;AAET,KAAI,aAAa,SAAS,aAAa,CACrC,QAAO;AAET,KAAI,SAAS,SAAS,aAAa,CACjC,QAAO;AAGT,QAAO"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lower-case-first.mjs","names":[],"sources":["../../../../../string-format/src/lower-case-first.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Lower case the first character of an input string.\n *\n * @remarks\n * \"tHISISANEXAMPLE\"\n *\n * @param input - The input string.\n * @returns The lower-cased string.\n */\nexport function lowerCaseFirst<T extends string | undefined>(input?: T): T {\n return (input ? input.charAt(0).toLowerCase() + input.slice(1) : input) as T;\n}\n"],"mappings":";;;;;;;;;;AA2BA,SAAgB,eAA6C,OAAc;AACzE,QAAQ,QAAQ,MAAM,OAAO,EAAE,CAAC,aAAa,GAAG,MAAM,MAAM,EAAE,GAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prepositions.mjs","names":[],"sources":["../../../../../string-format/src/prepositions.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const PREPOSITIONS = [\n \"about\",\n \"above\",\n \"across\",\n \"after\",\n \"against\",\n \"along\",\n \"among\",\n \"around\",\n \"at\",\n \"because of\",\n \"before\",\n \"behind\",\n \"below\",\n \"beneath\",\n \"beside\",\n \"besides\",\n \"between\",\n \"beyond\",\n \"but\",\n \"by\",\n \"concerning\",\n \"despite\",\n \"down\",\n \"during\",\n \"except\",\n \"excepting\",\n \"for\",\n \"from\",\n \"in\",\n \"in front of\",\n \"inside\",\n \"in spite of\",\n \"instead of\",\n \"into\",\n \"like\",\n \"near\",\n \"of\",\n \"off\",\n \"on\",\n \"onto\",\n \"out\",\n \"outside\",\n \"over\",\n \"past\",\n \"regarding\",\n \"since\",\n \"through\",\n \"throughout\",\n \"to\",\n \"toward\",\n \"under\",\n \"underneath\",\n \"until\",\n \"up\",\n \"upon\",\n \"up to\",\n \"with\",\n \"within\",\n \"without\",\n \"with regard to\",\n \"with respect to\"\n];\n"],"mappings":";AAkBA,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"special-cases.mjs","names":[],"sources":["../../../../../string-format/src/special-cases.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const SPECIAL_CASES = [\n \"2FA\",\n \"4K\",\n \"5K\",\n \"8K\",\n \"AGI\",\n \"BI\",\n \"ChatGPT\",\n \"CTA\",\n \"DateTime\",\n \"FMS\",\n \"GitHub\",\n \"GPT\",\n \"HD\",\n \"IBMid\",\n \"IDs\",\n \"iMac\",\n \"IMAX\",\n \"iOS\",\n \"iPad\",\n \"iPhone\",\n \"iPod\",\n \"LDAP\",\n \"LinkedIn\",\n \"LLM\",\n \"macOS\",\n \"McDonalds\",\n \"MCP\",\n \"ML\",\n \"MySQL\",\n \"NLG\",\n \"NLP\",\n \"NLU\",\n \"OpenAI\",\n \"PDFs\",\n \"PIM\",\n \"PEFT\",\n \"pH\",\n \"PostgreSQL\",\n \"SEO\",\n \"TTS\",\n \"UHD\",\n \"UUID\",\n \"XSS\",\n \"YouTube\",\n \"CSpell\",\n \"ESLint\"\n];\n"],"mappings":";AAkBA,MAAa,gBAAgB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"title-case.mjs","names":[],"sources":["../../../../../string-format/src/title-case.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ACRONYMS } from \"./acronyms\";\nimport { combine } from \"./combine\";\nimport { decamelize } from \"./decamelize\";\nimport type { FormatSpecialCasesOptions } from \"./format-special-cases\";\nimport { formatSpecialCases } from \"./format-special-cases\";\nimport { upperCaseFirst } from \"./upper-case-first\";\n\nexport interface TitleCaseOptions extends FormatSpecialCasesOptions {\n /**\n * Whether to expand acronyms in the input string.\n *\n * @remarks\n * If true, acronyms will be expanded to their full form before being converted to title case. For example, \"NASA\" would be expanded to \"National Aeronautics and Space Administration\".\n *\n * @defaultValue false\n */\n expandAcronyms?: boolean;\n}\n\n/**\n * Convert a string to title case.\n *\n * @param input - The input string to convert.\n * @param options - Options for formatting special cases.\n * @returns The title cased string.\n */\nexport function titleCase<T extends string | undefined>(\n input: T,\n options?: TitleCaseOptions\n): T {\n return input\n ?.replaceAll(\":\", \" - \")\n ?.replaceAll(\"+\", \" + \")\n ?.split(/\\s+-\\s+/)\n .map(segment =>\n decamelize(segment)\n .split(/[\\s\\-_]/)\n .map(upperCaseFirst)\n .map(value =>\n options?.expandAcronyms\n ? ACRONYMS[value]?.description || value\n : value\n )\n .map((value: string, index: number, array: string[]) =>\n formatSpecialCases(value, index, array, options)\n )\n .reduce(combine)\n )\n .join(\" - \") as T;\n}\n"],"mappings":";;;;;;;;;;;;;;AA4CA,SAAgB,UACd,OACA,SACG;AACH,QAAO,OACH,WAAW,KAAK,MAAM,EACtB,WAAW,KAAK,MAAM,EACtB,MAAM,UAAU,CACjB,KAAI,YACH,WAAW,QAAQ,CAChB,MAAM,UAAU,CAChB,IAAI,eAAe,CACnB,KAAI,UACH,SAAS,iBACL,SAAS,QAAQ,eAAe,QAChC,MACL,CACA,KAAK,OAAe,OAAe,UAClC,mBAAmB,OAAO,OAAO,OAAO,QAAQ,CACjD,CACA,OAAO,QAAQ,CACnB,CACA,KAAK,MAAM"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upper-case-first.mjs","names":[],"sources":["../../../../../string-format/src/upper-case-first.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Upper case the first character of an input string.\n *\n * @remarks\n * \"Thisisanexample\"\n *\n * @param input - The input string.\n * @returns The capitalized string.\n */\nexport function upperCaseFirst<T extends string | undefined>(input?: T): T {\n return (input ? input.charAt(0).toUpperCase() + input.slice(1) : input) as T;\n}\n"],"mappings":";;;;;;;;;;AA2BA,SAAgB,eAA6C,OAAc;AACzE,QAAQ,QAAQ,MAAM,OAAO,EAAE,CAAC,aAAa,GAAG,MAAM,MAAM,EAAE,GAAG"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|