@inlang/sdk 2.1.2 → 2.2.0
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/database/initDb.js +1 -4
- package/dist/database/initDb.js.map +1 -1
- package/dist/database/initDbAndSchema.test.js +1 -4
- package/dist/database/initDbAndSchema.test.js.map +1 -1
- package/dist/database/jsonbPlugin.js +1 -4
- package/dist/database/jsonbPlugin.js.map +1 -1
- package/dist/database/jsonbPlugin.test.js +1 -4
- package/dist/database/jsonbPlugin.test.js.map +1 -1
- package/dist/database/schema.js +1 -4
- package/dist/database/schema.js.map +1 -1
- package/dist/helper.js +1 -4
- package/dist/helper.js.map +1 -1
- package/dist/human-id/human-id.js +1 -4
- package/dist/human-id/human-id.js.map +1 -1
- package/dist/human-id/words.js +1 -4
- package/dist/human-id/words.js.map +1 -1
- package/dist/human-id/words.test.js +1 -4
- package/dist/human-id/words.test.js.map +1 -1
- package/dist/import-export/exportFiles.js +1 -4
- package/dist/import-export/exportFiles.js.map +1 -1
- package/dist/import-export/importFiles.js +1 -4
- package/dist/import-export/importFiles.js.map +1 -1
- package/dist/import-export/importFiles.test.js +1 -4
- package/dist/import-export/importFiles.test.js.map +1 -1
- package/dist/import-export/roundtrip.test.js +1 -4
- package/dist/import-export/roundtrip.test.js.map +1 -1
- package/dist/import-export/upsertBundleNestedMatchByProperties.js +1 -4
- package/dist/import-export/upsertBundleNestedMatchByProperties.js.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/json-schema/old-v1-message/fromMessageV1.js +1 -4
- package/dist/json-schema/old-v1-message/fromMessageV1.js.map +1 -1
- package/dist/json-schema/old-v1-message/fromMessageV1.test.js +1 -4
- package/dist/json-schema/old-v1-message/fromMessageV1.test.js.map +1 -1
- package/dist/json-schema/old-v1-message/schemaV1.js +1 -4
- package/dist/json-schema/old-v1-message/schemaV1.js.map +1 -1
- package/dist/json-schema/old-v1-message/toMessageV1.js +1 -4
- package/dist/json-schema/old-v1-message/toMessageV1.js.map +1 -1
- package/dist/json-schema/old-v1-message/toMessageV1.test.js +1 -4
- package/dist/json-schema/old-v1-message/toMessageV1.test.js.map +1 -1
- package/dist/json-schema/pattern.js +1 -4
- package/dist/json-schema/pattern.js.map +1 -1
- package/dist/json-schema/settings.js +1 -4
- package/dist/json-schema/settings.js.map +1 -1
- package/dist/json-schema/settings.test-d.js +1 -4
- package/dist/json-schema/settings.test-d.js.map +1 -1
- package/dist/json-schema/settings.test.js +1 -4
- package/dist/json-schema/settings.test.js.map +1 -1
- package/dist/lix/index.js +1 -4
- package/dist/lix/index.js.map +1 -1
- package/dist/lix-plugin/applyChanges.js +1 -4
- package/dist/lix-plugin/applyChanges.js.map +1 -1
- package/dist/lix-plugin/applyChanges.test.js +1 -4
- package/dist/lix-plugin/applyChanges.test.js.map +1 -1
- package/dist/lix-plugin/detectConflicts.js +1 -4
- package/dist/lix-plugin/detectConflicts.js.map +1 -1
- package/dist/lix-plugin/detectConflicts.test.js +1 -4
- package/dist/lix-plugin/detectConflicts.test.js.map +1 -1
- package/dist/lix-plugin/inlangLixPluginV1.js +1 -4
- package/dist/lix-plugin/inlangLixPluginV1.js.map +1 -1
- package/dist/lix-plugin/inlangLixPluginV1.test.js +1 -4
- package/dist/lix-plugin/inlangLixPluginV1.test.js.map +1 -1
- package/dist/lix-plugin/merge.test.js +1 -4
- package/dist/lix-plugin/merge.test.js.map +1 -1
- package/dist/lix-plugin/resolveConflictBySelecting.test.js +1 -4
- package/dist/lix-plugin/resolveConflictBySelecting.test.js.map +1 -1
- package/dist/migrations/v2/createMessageV1.js +1 -4
- package/dist/migrations/v2/createMessageV1.js.map +1 -1
- package/dist/migrations/v2/withLanguageTagToLocaleMigration.js +1 -4
- package/dist/migrations/v2/withLanguageTagToLocaleMigration.js.map +1 -1
- package/dist/migrations/v2/withLanguageTagToLocaleMigration.test.js +1 -4
- package/dist/migrations/v2/withLanguageTagToLocaleMigration.test.js.map +1 -1
- package/dist/plugin/cache.js +1 -4
- package/dist/plugin/cache.js.map +1 -1
- package/dist/plugin/cache.test.js +1 -4
- package/dist/plugin/cache.test.js.map +1 -1
- package/dist/plugin/errors.js +1 -4
- package/dist/plugin/errors.js.map +1 -1
- package/dist/plugin/importPlugins.js +1 -4
- package/dist/plugin/importPlugins.js.map +1 -1
- package/dist/plugin/importPlugins.test.js +1 -4
- package/dist/plugin/importPlugins.test.js.map +1 -1
- package/dist/plugin/meta/ideExtension.js +1 -4
- package/dist/plugin/meta/ideExtension.js.map +1 -1
- package/dist/plugin/schema.js +1 -4
- package/dist/plugin/schema.js.map +1 -1
- package/dist/project/api.js +1 -4
- package/dist/project/api.js.map +1 -1
- package/dist/project/loadProject.d.ts.map +1 -1
- package/dist/project/loadProject.js +1 -6
- package/dist/project/loadProject.js.map +1 -1
- package/dist/project/loadProject.test.js +1 -4
- package/dist/project/loadProject.test.js.map +1 -1
- package/dist/project/loadProjectFromDirectory.js +1 -4
- package/dist/project/loadProjectFromDirectory.js.map +1 -1
- package/dist/project/loadProjectFromDirectory.test.js +1 -4
- package/dist/project/loadProjectFromDirectory.test.js.map +1 -1
- package/dist/project/loadProjectInMemory.js +1 -4
- package/dist/project/loadProjectInMemory.js.map +1 -1
- package/dist/project/loadProjectInMemory.test.js +1 -4
- package/dist/project/loadProjectInMemory.test.js.map +1 -1
- package/dist/project/maybeCaptureTelemetry.d.ts.map +1 -1
- package/dist/project/maybeCaptureTelemetry.js +1 -6
- package/dist/project/maybeCaptureTelemetry.js.map +1 -1
- package/dist/project/maybeCaptureTelemetry.test.js +1 -4
- package/dist/project/maybeCaptureTelemetry.test.js.map +1 -1
- package/dist/project/newProject.d.ts.map +1 -1
- package/dist/project/newProject.js +1 -6
- package/dist/project/newProject.js.map +1 -1
- package/dist/project/newProject.test.js +1 -4
- package/dist/project/newProject.test.js.map +1 -1
- package/dist/project/saveProjectToDirectory.js +1 -4
- package/dist/project/saveProjectToDirectory.js.map +1 -1
- package/dist/project/saveProjectToDirectory.test.js +1 -4
- package/dist/project/saveProjectToDirectory.test.js.map +1 -1
- package/dist/query-utilities/index.js +1 -4
- package/dist/query-utilities/index.js.map +1 -1
- package/dist/query-utilities/insertBundleNested.js +1 -4
- package/dist/query-utilities/insertBundleNested.js.map +1 -1
- package/dist/query-utilities/selectBundleNested.js +1 -4
- package/dist/query-utilities/selectBundleNested.js.map +1 -1
- package/dist/query-utilities/updateBundleNested.js +1 -4
- package/dist/query-utilities/updateBundleNested.js.map +1 -1
- package/dist/query-utilities/upsertBundleNested.js +1 -4
- package/dist/query-utilities/upsertBundleNested.js.map +1 -1
- package/dist/services/env-variables/index.js +2 -5
- package/dist/services/env-variables/index.js.map +1 -1
- package/dist/services/telemetry/capture.d.ts.map +1 -1
- package/dist/services/telemetry/capture.js +5 -9
- package/dist/services/telemetry/capture.js.map +1 -1
- package/dist/services/telemetry/capture.test.js +1 -4
- package/dist/services/telemetry/capture.test.js.map +1 -1
- package/dist/utilities/detectJsonFormatting.js +1 -4
- package/dist/utilities/detectJsonFormatting.js.map +1 -1
- package/dist/utilities/detectJsonFormatting.test.js +1 -4
- package/dist/utilities/detectJsonFormatting.test.js.map +1 -1
- package/package.json +5 -9
- package/src/project/loadProject.ts +0 -3
- package/src/project/maybeCaptureTelemetry.ts +0 -2
- package/src/project/newProject.ts +0 -2
- package/src/services/telemetry/capture.ts +4 -5
- package/dist/services/error-reporting/index.d.ts +0 -15
- package/dist/services/error-reporting/index.d.ts.map +0 -1
- package/dist/services/error-reporting/index.js +0 -30
- package/dist/services/error-reporting/index.js.map +0 -1
- package/src/services/error-reporting/index.ts +0 -28
package/dist/database/initDb.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fc2b29fc-faec-5ff5-91e6-5664b8dc4c09")}catch(e){}}();
|
|
3
1
|
import { CamelCasePlugin, Kysely } from "kysely";
|
|
4
2
|
import { applySchema } from "./schema.js";
|
|
5
3
|
import { createDialect } from "sqlite-wasm-kysely";
|
|
@@ -32,5 +30,4 @@ function initDefaultValueFunctions(args) {
|
|
|
32
30
|
xFunc: () => humanId(),
|
|
33
31
|
});
|
|
34
32
|
}
|
|
35
|
-
//# sourceMappingURL=initDb.js.map
|
|
36
|
-
//# debugId=fc2b29fc-faec-5ff5-91e6-5664b8dc4c09
|
|
33
|
+
//# sourceMappingURL=initDb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initDb.js","sources":["database/initDb.ts"],"
|
|
1
|
+
{"version":3,"file":"initDb.js","sourceRoot":"/","sources":["database/initDb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,WAAW,EAA6B,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,aAAa,EAA2B,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,UAAU,MAAM,CAAC,IAAoC;IAC1D,yBAAyB,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACnD,WAAW,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACrC,MAAM,EAAE,GAAG,IAAI,MAAM,CAAuB;QAC3C,OAAO,EAAE,aAAa,CAAC;YACtB,QAAQ,EAAE,IAAI,CAAC,MAAM;SACrB,CAAC;QACF,OAAO,EAAE;YACR,IAAI,eAAe,EAAE;YACrB,IAAI,WAAW,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;SAC1C;KACD,CAAC,CAAC;IACH,OAAO,EAAE,CAAC;AACX,CAAC;AAED,SAAS,yBAAyB,CAAC,IAAoC;IACtE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;QAC1B,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE;KACjB,CAAC,CAAC;IACH,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;QAC1B,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE;KACtB,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { CamelCasePlugin, Kysely } from \"kysely\";\nimport { applySchema, type InlangDatabaseSchema } from \"./schema.js\";\nimport { createDialect, type SqliteWasmDatabase } from \"sqlite-wasm-kysely\";\nimport { v7 } from \"uuid\";\nimport { humanId } from \"../human-id/human-id.js\";\nimport { JsonbPlugin } from \"./jsonbPlugin.js\";\n\nexport function initDb(args: { sqlite: SqliteWasmDatabase }) {\n\tinitDefaultValueFunctions({ sqlite: args.sqlite });\n\tapplySchema({ sqlite: args.sqlite });\n\tconst db = new Kysely<InlangDatabaseSchema>({\n\t\tdialect: createDialect({\n\t\t\tdatabase: args.sqlite,\n\t\t}),\n\t\tplugins: [\n\t\t\tnew CamelCasePlugin(),\n\t\t\tnew JsonbPlugin({ database: args.sqlite }),\n\t\t],\n\t});\n\treturn db;\n}\n\nfunction initDefaultValueFunctions(args: { sqlite: SqliteWasmDatabase }) {\n\targs.sqlite.createFunction({\n\t\tname: \"uuid_v7\",\n\t\tarity: 0,\n\t\txFunc: () => v7(),\n\t});\n\targs.sqlite.createFunction({\n\t\tname: \"human_id\",\n\t\tarity: 0,\n\t\txFunc: () => humanId(),\n\t});\n}\n"]}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="59953b14-f794-5a3a-85a5-18f6d5b194c1")}catch(e){}}();
|
|
3
1
|
import { createInMemoryDatabase } from "sqlite-wasm-kysely";
|
|
4
2
|
import { test, expect } from "vitest";
|
|
5
3
|
import { initDb } from "./initDb.js";
|
|
@@ -106,5 +104,4 @@ test.todo("it should enable foreign key constraints", async () => {
|
|
|
106
104
|
})
|
|
107
105
|
.execute()).rejects.toThrow();
|
|
108
106
|
});
|
|
109
|
-
//# sourceMappingURL=initDbAndSchema.test.js.map
|
|
110
|
-
//# debugId=59953b14-f794-5a3a-85a5-18f6d5b194c1
|
|
107
|
+
//# sourceMappingURL=initDbAndSchema.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initDbAndSchema.test.js","sources":["database/initDbAndSchema.test.ts"],"
|
|
1
|
+
{"version":3,"file":"initDbAndSchema.test.js","sourceRoot":"/","sources":["database/initDbAndSchema.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAE1C,IAAI,CAAC,uBAAuB,EAAE,KAAK,IAAI,EAAE;IACxC,MAAM,MAAM,GAAG,MAAM,sBAAsB,CAAC;QAC3C,QAAQ,EAAE,KAAK;KACf,CAAC,CAAC;IACH,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAE9B,MAAM,MAAM,GAAG,MAAM,EAAE;SACrB,UAAU,CAAC,QAAQ,CAAC;SACpB,aAAa,E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ACC,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,MAAM;SACZ;KACD,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,iDAAiD;AACjD,IAAI,CAAC,IAAI,CAAC,0CAA0C,EAAE,KAAK,IAAI,EAAE;IAChE,MAAM,MAAM,GAAG,MAAM,sBAAsB,CAAC;QAC3C,QAAQ,EAAE,KAAK;KACf,CAAC,CAAC;IACH,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAE9B,MAAM,CAAC,GAAG,EAAE,CACX,EAAE;SACA,UAAU,CAAC,SAAS,CAAC;SACrB,MAAM,CAAC;QACP,QAAQ,EAAE,cAAc;QACxB,MAAM,EAAE,IAAI;KACZ,CAAC;SACD,OAAO,EAAE,CACX,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;AACrB,CAAC,CAAC,CAAC","sourcesContent":["import { createInMemoryDatabase } from \"sqlite-wasm-kysely\";\nimport { test, expect } from \"vitest\";\nimport { initDb } from \"./initDb.js\";\nimport { isHumanId } from \"../human-id/human-id.js\";\nimport { validate as isUuid } from \"uuid\";\n\ntest(\"bundle default values\", async () => {\n\tconst sqlite = await createInMemoryDatabase({\n\t\treadOnly: false,\n\t});\n\tconst db = initDb({ sqlite });\n\n\tconst bundle = await db\n\t\t.insertInto(\"bundle\")\n\t\t.defaultValues()\n\t\t.returningAll()\n\t\t.executeTakeFirstOrThrow();\n\n\texpect(isHumanId(bundle.id)).toBe(true);\n\texpect(bundle.declarations).toStrictEqual([]);\n});\n\ntest(\"message default values\", async () => {\n\tconst sqlite = await createInMemoryDatabase({\n\t\treadOnly: false,\n\t});\n\tconst db = initDb({ sqlite });\n\n\tconst bundle = await db\n\t\t.insertInto(\"bundle\")\n\t\t.defaultValues()\n\t\t.returningAll()\n\t\t.executeTakeFirstOrThrow();\n\n\tconst message = await db\n\t\t.insertInto(\"message\")\n\t\t.values({\n\t\t\tbundleId: bundle.id,\n\t\t\tlocale: \"en\",\n\t\t})\n\t\t.returningAll()\n\t\t.executeTakeFirstOrThrow();\n\n\texpect(isUuid(message.id)).toBe(true);\n\texpect(message.selectors).toStrictEqual([]);\n});\n\ntest(\"variant default values\", async () => {\n\tconst sqlite = await createInMemoryDatabase({\n\t\treadOnly: false,\n\t});\n\tconst db = initDb({ sqlite });\n\n\tconst bundle = await db\n\t\t.insertInto(\"bundle\")\n\t\t.defaultValues()\n\t\t.returningAll()\n\t\t.executeTakeFirstOrThrow();\n\n\tconst message = await db\n\t\t.insertInto(\"message\")\n\t\t.values({\n\t\t\tbundleId: bundle.id,\n\t\t\tlocale: \"en\",\n\t\t})\n\t\t.returningAll()\n\t\t.executeTakeFirstOrThrow();\n\n\tconst variant = await db\n\t\t.insertInto(\"variant\")\n\t\t.values({\n\t\t\tmessageId: message.id,\n\t\t})\n\t\t.returningAll()\n\t\t.executeTakeFirstOrThrow();\n\n\texpect(isUuid(variant.id)).toBe(true);\n\texpect(variant.matches).toStrictEqual([]);\n\texpect(variant.pattern).toStrictEqual([]);\n});\n\ntest(\"it should handle json serialization and parsing for bundles\", async () => {\n\tconst sqlite = await createInMemoryDatabase({\n\t\treadOnly: false,\n\t});\n\tconst db = initDb({ sqlite });\n\n\tconst bundle = await db\n\t\t.insertInto(\"bundle\")\n\t\t.values({\n\t\t\tdeclarations: [\n\t\t\t\t{\n\t\t\t\t\ttype: \"input-variable\",\n\t\t\t\t\tname: \"mock\",\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t\t.returningAll()\n\t\t.executeTakeFirstOrThrow();\n\n\texpect(bundle.declarations).toStrictEqual([\n\t\t{\n\t\t\ttype: \"input-variable\",\n\t\t\tname: \"mock\",\n\t\t},\n\t]);\n});\n\n// https://github.com/opral/inlang-sdk/issues/209\ntest.todo(\"it should enable foreign key constraints\", async () => {\n\tconst sqlite = await createInMemoryDatabase({\n\t\treadOnly: false,\n\t});\n\tconst db = initDb({ sqlite });\n\n\texpect(() =>\n\t\tdb\n\t\t\t.insertInto(\"message\")\n\t\t\t.values({\n\t\t\t\tbundleId: \"non-existent\",\n\t\t\t\tlocale: \"en\",\n\t\t\t})\n\t\t\t.execute()\n\t).rejects.toThrow();\n});\n"]}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e8e4087c-9464-57fc-b765-367ee0953d9b")}catch(e){}}();
|
|
3
1
|
import { OperationNodeTransformer, sql, ValueListNode, ValueNode, ValuesNode, ParseJSONResultsPlugin, OnConflictNode, } from "kysely";
|
|
4
2
|
export class JsonbPlugin {
|
|
5
3
|
#serializeJsonTransformer = new SerializeJsonbTransformer();
|
|
@@ -179,5 +177,4 @@ function maybeSerializeJson(value) {
|
|
|
179
177
|
// values,
|
|
180
178
|
// };
|
|
181
179
|
// }
|
|
182
|
-
//# sourceMappingURL=jsonbPlugin.js.map
|
|
183
|
-
//# debugId=e8e4087c-9464-57fc-b765-367ee0953d9b
|
|
180
|
+
//# sourceMappingURL=jsonbPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonbPlugin.js","sources":["database/jsonbPlugin.ts"],"sourceRoot":"/","sourcesContent":["import {\n\tOperationNodeTransformer,\n\tsql,\n\tValueListNode,\n\tValueNode,\n\tValuesNode,\n\tParseJSONResultsPlugin,\n\ttype KyselyPlugin,\n\ttype PluginTransformQueryArgs,\n\ttype PluginTransformResultArgs,\n\ttype QueryResult,\n\ttype RootOperationNode,\n\ttype UnknownRow,\n\tOnConflictNode,\n} from \"kysely\";\nimport type { SqliteWasmDatabase } from \"sqlite-wasm-kysely\";\n\nexport class JsonbPlugin implements KyselyPlugin {\n\t#serializeJsonTransformer = new SerializeJsonbTransformer();\n\t#parseJsonPlugin = new ParseJSONResultsPlugin();\n\t#database: SqliteWasmDatabase;\n\n\tconstructor(args: { database: SqliteWasmDatabase }) {\n\t\tthis.#database = args.database;\n\t}\n\n\t/**\n\t * For an outgoing query like insert or update, the JSON\n\t * values are transformed into `jsonb` function calls when\n\t * executed against the database.\n\t */\n\ttransformQuery(args: PluginTransformQueryArgs): RootOperationNode {\n\t\tif (\n\t\t\targs.node.kind === \"InsertQueryNode\" ||\n\t\t\targs.node.kind === \"UpdateQueryNode\"\n\t\t) {\n\t\t\tconst result = this.#serializeJsonTransformer.transformNode(args.node);\n\t\t\treturn result;\n\t\t}\n\t\treturn args.node;\n\t}\n\n\t/**\n\t * For incoming query results, the JSON binaries are parsed\n\t * into JSON objects.\n\t */\n\tasync transformResult(\n\t\targs: PluginTransformResultArgs\n\t): Promise<QueryResult<UnknownRow>> {\n\t\tfor (const row of args.result.rows) {\n\t\t\tfor (const key in row) {\n\t\t\t\tif (\n\t\t\t\t\trow[key] instanceof ArrayBuffer ||\n\t\t\t\t\t// uint8array, etc\n\t\t\t\t\tArrayBuffer.isView(row[key])\n\t\t\t\t) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst res = this.#database.exec(`SELECT json(?)`, {\n\t\t\t\t\t\t\treturnValue: \"resultRows\",\n\t\t\t\t\t\t\tbind: [row[key] as any],\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\trow[key] = JSON.parse(res[0] as any);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// it's not a json binary\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// in case it's a regular (text) json, run it through kyseley's json parser\n\t\treturn this.#parseJsonPlugin.transformResult(args);\n\t}\n}\n\nclass SerializeJsonbTransformer extends OperationNodeTransformer {\n\tprotected override transformOnConflict(node: OnConflictNode): OnConflictNode {\n\t\treturn super.transformOnConflict({\n\t\t\t...node,\n\t\t\tupdates: node.updates?.map((updateItem) => {\n\t\t\t\tif (updateItem.kind !== \"ColumnUpdateNode\") {\n\t\t\t\t\treturn updateItem;\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tkind: \"ColumnUpdateNode\",\n\t\t\t\t\tcolumn: updateItem.column,\n\t\t\t\t\t// @ts-expect-error - we know that the value is a ValueNode\n\t\t\t\t\tvalue: this.transformValue(updateItem.value),\n\t\t\t\t};\n\t\t\t}),\n\t\t});\n\t}\n\n\tprotected override transformValue(node: ValueNode): ValueNode {\n\t\tconst { value } = node;\n\t\tconst serializedValue = maybeSerializeJson(value);\n\t\tif (value === serializedValue) {\n\t\t\treturn node;\n\t\t}\n\t\t// @ts-expect-error - we know that the node is a ValueNode\n\t\treturn sql`jsonb(${serializedValue})`.toOperationNode();\n\t}\n\t/**\n\t * Transforms the value list node by replacing all JSON objects with `jsonb` function calls.\n\t */\n\tprotected override transformValueList(node: ValueListNode): ValueListNode {\n\t\treturn super.transformValueList({\n\t\t\t...node,\n\t\t\tvalues: node.values.map((listNodeItem) => {\n\t\t\t\tif (listNodeItem.kind !== \"ValueNode\") {\n\t\t\t\t\treturn listNodeItem;\n\t\t\t\t}\n\t\t\t\t// @ts-expect-error - we know that the node is a ValueNode\n\t\t\t\tconst { value } = listNodeItem;\n\t\t\t\tconst serializedValue = maybeSerializeJson(value);\n\n\t\t\t\tif (value === serializedValue) {\n\t\t\t\t\treturn listNodeItem;\n\t\t\t\t}\n\t\t\t\treturn sql`jsonb(${serializedValue})`.toOperationNode();\n\t\t\t}),\n\t\t});\n\t}\n\n\t/**\n\t * Why this function is needed or why this works remains a mystery.\n\t */\n\toverride transformValues(node: ValuesNode): ValuesNode {\n\t\treturn super.transformValues({\n\t\t\t...node,\n\t\t\tvalues: node.values.map((valueItemNode) => {\n\t\t\t\tif (valueItemNode.kind !== \"PrimitiveValueListNode\") {\n\t\t\t\t\treturn valueItemNode;\n\t\t\t\t}\n\n\t\t\t\t// change valueItem to ValueListNode\n\t\t\t\treturn {\n\t\t\t\t\tkind: \"ValueListNode\",\n\t\t\t\t\tvalues: valueItemNode.values.map(\n\t\t\t\t\t\t(value) =>\n\t\t\t\t\t\t\t({\n\t\t\t\t\t\t\t\tkind: \"ValueNode\",\n\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t}) as ValueNode\n\t\t\t\t\t),\n\t\t\t\t} as ValueListNode;\n\t\t\t}),\n\t\t});\n\t}\n}\n\nfunction maybeSerializeJson(value: any): any {\n\tif (\n\t\t// binary data\n\t\tvalue instanceof ArrayBuffer ||\n\t\t// uint8array, etc\n\t\tArrayBuffer.isView(value) ||\n\t\tvalue === null ||\n\t\tvalue === undefined\n\t) {\n\t\treturn value;\n\t} else if (typeof value === \"object\" || Array.isArray(value)) {\n\t\treturn JSON.stringify(value);\n\t}\n\treturn value;\n}\n\n// The code here didn't work https://github.com/opral/inlang-sdk/issues/132#issuecomment-2339321910\n// but would be the \"right\" solution to avoid heuristics which column might or might not be a json column\n// // modifies the query in place for readability and performance\n// function mapQuery(\n// \tnode: InsertQueryNode,\n// \tjsonColumns: TableSchema\n// ): InsertQueryNode {\n// \t// if the query is not an insert query, we don't need to do anything\n// \tif (node.into === undefined) {\n// \t\treturn node;\n// \t}\n// \t// if the table is not in the schema that has json columns, we don't need to do anything\n// \tconst columnsWithJson = jsonColumns[node.into.table.identifier.name];\n// \tif (columnsWithJson === undefined) {\n// \t\treturn node;\n// \t}\n// \t// find the indexes of the values that need to be transformed\n// \t// SQL query: INSERT INTO table (col1, col2) VALUES (val1, val2)\n// \tconst indexesThatNeedToBeTransformed: [number, string][] = [];\n// \tfor (const [i, col] of node.columns?.entries() ?? []) {\n// \t\tconst jsonType = columnsWithJson[col.column.name];\n// \t\tif (jsonType !== undefined) {\n// \t\t\tindexesThatNeedToBeTransformed.push([i, jsonType]);\n// \t\t}\n// \t}\n// \tconst values = structuredClone(node.values);\n// \tfor (const [i, jsonType] of indexesThatNeedToBeTransformed) {\n// \t\tif (\n// \t\t\t// top level values node that should contain a list of values\n// \t\t\tnode.values?.kind !== \"ValuesNode\" &&\n// \t\t\t// the node we are interested in must be a value node\n// \t\t\t// @ts-expect-error - we know that the node is a ValuesNode with values\n// \t\t\t(node.values as ValuesNode).values?.[i].kind !== \"ValueNode\"\n// \t\t) {\n// \t\t\tthrow new Error(\"Unexpected node structure\");\n// \t\t}\n// \t\tconst serializedJson = JSON.stringify(node.values.values[0].values[i]);\n// \t\t// @ts-expect-error - we know that the node is a ValuesNode with values\n// \t\tvalues.values[0].values[i] =\n// \t\t\tjsonType === \"jsonb\"\n// \t\t\t\t? sql`jsonb(${serializedJson})`.toOperationNode()\n// \t\t\t\t: sql`json(${serializedJson})`.toOperationNode();\n// \t}\n\n// \treturn {\n// \t\t...node,\n// \t\tvalues,\n// \t};\n// }\n"],"names":[],"mappings":";;AAAA,OAAO,EACN,wBAAwB,EACxB,GAAG,EACH,aAAa,EACb,SAAS,EACT,UAAU,EACV,sBAAsB,EAOtB,cAAc,GACd,MAAM,QAAQ,CAAC;AAGhB,MAAM,OAAO,WAAW;IACvB,yBAAyB,GAAG,IAAI,yBAAyB,EAAE,CAAC;IAC5D,gBAAgB,GAAG,IAAI,sBAAsB,EAAE,CAAC;IAChD,SAAS,CAAqB;IAE9B,YAAY,IAAsC;QACjD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACH,cAAc,CAAC,IAA8B;QAC5C,IACC,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,iBAAiB;YACpC,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,iBAAiB,EACnC,CAAC;YACF,MAAM,MAAM,GAAG,IAAI,CAAC,yBAAyB,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACvE,OAAO,MAAM,CAAC;QACf,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,eAAe,CACpB,IAA+B;QAE/B,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YACpC,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S,EAClB,CAAC;QACF,OAAO,KAAK,CAAC;IACd,CAAC;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9D,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAED,mGAAmG;AACnG,yGAAyG;AACzG,iEAAiE;AACjE,qBAAqB;AACrB,0BAA0B;AAC1B,4BAA4B;AAC5B,uBAAuB;AACvB,wEAAwE;AACxE,kCAAkC;AAClC,iBAAiB;AACjB,KAAK;AACL,4FAA4F;AAC5F,yEAAyE;AACzE,wCAAwC;AACxC,iBAAiB;AACjB,KAAK;AACL,iEAAiE;AACjE,oEAAoE;AACpE,kEAAkE;AAClE,2DAA2D;AAC3D,uDAAuD;AACvD,kCAAkC;AAClC,yDAAyD;AACzD,MAAM;AACN,KAAK;AACL,gDAAgD;AAChD,iEAAiE;AACjE,SAAS;AACT,mEAAmE;AACnE,2CAA2C;AAC3C,2DAA2D;AAC3D,6EAA6E;AAC7E,kEAAkE;AAClE,QAAQ;AACR,mDAAmD;AACnD,MAAM;AACN,4EAA4E;AAC5E,4EAA4E;AAC5E,iCAAiC;AACjC,0BAA0B;AAC1B,wDAAwD;AACxD,wDAAwD;AACxD,KAAK;AAEL,YAAY;AACZ,aAAa;AACb,YAAY;AACZ,MAAM;AACN,IAAI","sourcesContent":["import {\n\tOperationNodeTransformer,\n\tsql,\n\tValueListNode,\n\tValueNode,\n\tValuesNode,\n\tParseJSONResultsPlugin,\n\ttype KyselyPlugin,\n\ttype PluginTransformQueryArgs,\n\ttype PluginTransformResultArgs,\n\ttype QueryResult,\n\ttype RootOperationNode,\n\ttype UnknownRow,\n\tOnConflictNode,\n} from \"kysely\";\nimport type { SqliteWasmDatabase } from \"sqlite-wasm-kysely\";\n\nexport class JsonbPlugin implements KyselyPlugin {\n\t#serializeJsonTransformer = new SerializeJsonbTransformer();\n\t#parseJsonPlugin = new ParseJSONResultsPlugin();\n\t#database: SqliteWasmDatabase;\n\n\tconstructor(args: { database: SqliteWasmDatabase }) {\n\t\tthis.#database = args.database;\n\t}\n\n\t/**\n\t * For an outgoing query like insert or update, the JSON\n\t * values are transformed into `jsonb` function calls when\n\t * executed against the database.\n\t */\n\ttransformQuery(args: PluginTransformQueryArgs): RootOperationNode {\n\t\tif (\n\t\t\targs.node.kind === \"InsertQueryNode\" ||\n\t\t\targs.node.kind === \"UpdateQueryNode\"\n\t\t) {\n\t\t\tconst result = this.#serializeJsonTransformer.transformNode(args.node);\n\t\t\treturn result;\n\t\t}\n\t\treturn args.node;\n\t}\n\n\t/**\n\t * For incoming query results, the JSON binaries are parsed\n\t * into JSON objects.\n\t */\n\tasync transformResult(\n\t\targs: PluginTransformResultArgs\n\t): Promise<QueryResult<UnknownRow>> {\n\t\tfor (const row of args.result.rows) {\n\t\t\tfor (const key in row) {\n\t\t\t\tif (\n\t\t\t\t\trow[key] instanceof ArrayBuffer ||\n\t\t\t\t\t// uint8array, etc\n\t\t\t\t\tArrayBuffer.isView(row[key])\n\t\t\t\t) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst res = this.#database.exec(`SELECT json(?)`, {\n\t\t\t\t\t\t\treturnValue: \"resultRows\",\n\t\t\t\t\t\t\tbind: [row[key] as any],\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\trow[key] = JSON.parse(res[0] as any);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// it's not a json binary\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// in case it's a regular (text) json, run it through kyseley's json parser\n\t\treturn this.#parseJsonPlugin.transformResult(args);\n\t}\n}\n\nclass SerializeJsonbTransformer extends OperationNodeTransformer {\n\tprotected override transformOnConflict(node: OnConflictNode): OnConflictNode {\n\t\treturn super.transformOnConflict({\n\t\t\t...node,\n\t\t\tupdates: node.updates?.map((updateItem) => {\n\t\t\t\tif (updateItem.kind !== \"ColumnUpdateNode\") {\n\t\t\t\t\treturn updateItem;\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tkind: \"ColumnUpdateNode\",\n\t\t\t\t\tcolumn: updateItem.column,\n\t\t\t\t\t// @ts-expect-error - we know that the value is a ValueNode\n\t\t\t\t\tvalue: this.transformValue(updateItem.value),\n\t\t\t\t};\n\t\t\t}),\n\t\t});\n\t}\n\n\tprotected override transformValue(node: ValueNode): ValueNode {\n\t\tconst { value } = node;\n\t\tconst serializedValue = maybeSerializeJson(value);\n\t\tif (value === serializedValue) {\n\t\t\treturn node;\n\t\t}\n\t\t// @ts-expect-error - we know that the node is a ValueNode\n\t\treturn sql`jsonb(${serializedValue})`.toOperationNode();\n\t}\n\t/**\n\t * Transforms the value list node by replacing all JSON objects with `jsonb` function calls.\n\t */\n\tprotected override transformValueList(node: ValueListNode): ValueListNode {\n\t\treturn super.transformValueList({\n\t\t\t...node,\n\t\t\tvalues: node.values.map((listNodeItem) => {\n\t\t\t\tif (listNodeItem.kind !== \"ValueNode\") {\n\t\t\t\t\treturn listNodeItem;\n\t\t\t\t}\n\t\t\t\t// @ts-expect-error - we know that the node is a ValueNode\n\t\t\t\tconst { value } = listNodeItem;\n\t\t\t\tconst serializedValue = maybeSerializeJson(value);\n\n\t\t\t\tif (value === serializedValue) {\n\t\t\t\t\treturn listNodeItem;\n\t\t\t\t}\n\t\t\t\treturn sql`jsonb(${serializedValue})`.toOperationNode();\n\t\t\t}),\n\t\t});\n\t}\n\n\t/**\n\t * Why this function is needed or why this works remains a mystery.\n\t */\n\toverride transformValues(node: ValuesNode): ValuesNode {\n\t\treturn super.transformValues({\n\t\t\t...node,\n\t\t\tvalues: node.values.map((valueItemNode) => {\n\t\t\t\tif (valueItemNode.kind !== \"PrimitiveValueListNode\") {\n\t\t\t\t\treturn valueItemNode;\n\t\t\t\t}\n\n\t\t\t\t// change valueItem to ValueListNode\n\t\t\t\treturn {\n\t\t\t\t\tkind: \"ValueListNode\",\n\t\t\t\t\tvalues: valueItemNode.values.map(\n\t\t\t\t\t\t(value) =>\n\t\t\t\t\t\t\t({\n\t\t\t\t\t\t\t\tkind: \"ValueNode\",\n\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t}) as ValueNode\n\t\t\t\t\t),\n\t\t\t\t} as ValueListNode;\n\t\t\t}),\n\t\t});\n\t}\n}\n\nfunction maybeSerializeJson(value: any): any {\n\tif (\n\t\t// binary data\n\t\tvalue instanceof ArrayBuffer ||\n\t\t// uint8array, etc\n\t\tArrayBuffer.isView(value) ||\n\t\tvalue === null ||\n\t\tvalue === undefined\n\t) {\n\t\treturn value;\n\t} else if (typeof value === \"object\" || Array.isArray(value)) {\n\t\treturn JSON.stringify(value);\n\t}\n\treturn value;\n}\n\n// The code here didn't work https://github.com/opral/inlang-sdk/issues/132#issuecomment-2339321910\n// but would be the \"right\" solution to avoid heuristics which column might or might not be a json column\n// // modifies the query in place for readability and performance\n// function mapQuery(\n// \tnode: InsertQueryNode,\n// \tjsonColumns: TableSchema\n// ): InsertQueryNode {\n// \t// if the query is not an insert query, we don't need to do anything\n// \tif (node.into === undefined) {\n// \t\treturn node;\n// \t}\n// \t// if the table is not in the schema that has json columns, we don't need to do anything\n// \tconst columnsWithJson = jsonColumns[node.into.table.identifier.name];\n// \tif (columnsWithJson === undefined) {\n// \t\treturn node;\n// \t}\n// \t// find the indexes of the values that need to be transformed\n// \t// SQL query: INSERT INTO table (col1, col2) VALUES (val1, val2)\n// \tconst indexesThatNeedToBeTransformed: [number, string][] = [];\n// \tfor (const [i, col] of node.columns?.entries() ?? []) {\n// \t\tconst jsonType = columnsWithJson[col.column.name];\n// \t\tif (jsonType !== undefined) {\n// \t\t\tindexesThatNeedToBeTransformed.push([i, jsonType]);\n// \t\t}\n// \t}\n// \tconst values = structuredClone(node.values);\n// \tfor (const [i, jsonType] of indexesThatNeedToBeTransformed) {\n// \t\tif (\n// \t\t\t// top level values node that should contain a list of values\n// \t\t\tnode.values?.kind !== \"ValuesNode\" &&\n// \t\t\t// the node we are interested in must be a value node\n// \t\t\t// @ts-expect-error - we know that the node is a ValuesNode with values\n// \t\t\t(node.values as ValuesNode).values?.[i].kind !== \"ValueNode\"\n// \t\t) {\n// \t\t\tthrow new Error(\"Unexpected node structure\");\n// \t\t}\n// \t\tconst serializedJson = JSON.stringify(node.values.values[0].values[i]);\n// \t\t// @ts-expect-error - we know that the node is a ValuesNode with values\n// \t\tvalues.values[0].values[i] =\n// \t\t\tjsonType === \"jsonb\"\n// \t\t\t\t? sql`jsonb(${serializedJson})`.toOperationNode()\n// \t\t\t\t: sql`json(${serializedJson})`.toOperationNode();\n// \t}\n\n// \treturn {\n// \t\t...node,\n// \t\tvalues,\n// \t};\n// }\n"]}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a9bcdcfb-24b6-567b-83ae-3848149139a8")}catch(e){}}();
|
|
3
1
|
import { Kysely } from "kysely";
|
|
4
2
|
import { createDialect, createInMemoryDatabase } from "sqlite-wasm-kysely";
|
|
5
3
|
import { test, expect } from "vitest";
|
|
@@ -115,5 +113,4 @@ test("storing json as text is supposed to fail to avoid heuristics if the json s
|
|
|
115
113
|
.returningAll()
|
|
116
114
|
.executeTakeFirstOrThrow()).rejects.toThrowErrorMatchingInlineSnapshot(`[SQLite3Error: SQLITE_CONSTRAINT_DATATYPE: sqlite3 result code 3091: cannot store BLOB value in TEXT column foo.data]`);
|
|
117
115
|
});
|
|
118
|
-
//# sourceMappingURL=jsonbPlugin.test.js.map
|
|
119
|
-
//# debugId=a9bcdcfb-24b6-567b-83ae-3848149139a8
|
|
116
|
+
//# sourceMappingURL=jsonbPlugin.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonbPlugin.test.js","sources":["database/jsonbPlugin.test.ts"],"
|
|
1
|
+
{"version":3,"file":"jsonbPlugin.test.js","sourceRoot":"/","sources":["database/jsonbPlugin.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,IAAI,CAAC,8CAA8C,EAAE,KAAK,IAAI,EAAE;IAO/D,MAAM,QAAQ,GAAG,MAAM,sBAAsB,CAAC;QAC7C,QAAQ,EAAE,KAAK;KACf,CAAC,CAAC;IAEH,QAAQ,CAAC,IAAI,CAAC;;;;;GAKZ,CAAC,CAAC;IAEJ,MAAM,EAAE,GAAG,IAAI,MAAM,CAAa;QACjC,OAAO,EAAE,aAAa,CAAC;YACtB,QAAQ;SACR,CAAC;QACF,OAAO,EAAE,CAAC,IAAI,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;KACxC,CAAC,CAAC;IAEH,MAAM,GAAG,GAAG,MAAM,EAAE;SAClB,UAAU,CAAC,KAAK,CAAC;SACjB,MAAM,CAAC;QACP,EAAE,EAAE,MAAM;QACV,IAAI,EAAE;YACL,IAAI,EAAE,KAAK;SACX;KACD,CAAC;SACD,YAAY,EAAE;SACd,uBAAuB,EAAE,CAAC;IAE5B,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC;QACnB,EAAE,EAAE,MAAM;QACV,IAAI,EAAE;YACL,IAAI,EAAE,KAAK;SACX;KACD,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,2BAA2B,EAAE,KAAK,IAAI,EAAE;IAO5C,MAAM,QAAQ,GAAG,MAAM,sBAAsB,CAAC;QAC7C,QAAQ,EAAE,K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QAAQ,CAAC,IAAI,CAAC;;;;;GAKZ,CAAC,CAAC;IAEJ,MAAM,EAAE,GAAG,IAAI,MAAM,CAAa;QACjC,OAAO,EAAE,aAAa,CAAC;YACtB,QAAQ;SACR,CAAC;QACF,OAAO,EAAE,CAAC,IAAI,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;KACxC,CAAC,CAAC;IAEH,MAAM,CAAC,GAAG,EAAE,CACX,EAAE;SACA,UAAU,CAAC,KAAK,CAAC;SACjB,MAAM,CAAC;QACP,EAAE,EAAE,MAAM;QACV,IAAI,EAAE;YACL,GAAG,EAAE,KAAK;SACV;KACD,CAAC;SACD,YAAY,EAAE;SACd,uBAAuB,EAAE,CAC3B,CAAC,OAAO,CAAC,kCAAkC,CAC3C,uHAAuH,CACvH,CAAC;AACH,CAAC,CAAC,CAAC","sourcesContent":["import { Kysely } from \"kysely\";\nimport { createDialect, createInMemoryDatabase } from \"sqlite-wasm-kysely\";\nimport { test, expect } from \"vitest\";\nimport { JsonbPlugin } from \"./jsonbPlugin.js\";\n\ntest(\"parsing and serializing of jsonb should work\", async () => {\n\ttype MockSchema = {\n\t\tfoo: {\n\t\t\tid: string;\n\t\t\tdata: Record<string, any>;\n\t\t};\n\t};\n\tconst database = await createInMemoryDatabase({\n\t\treadOnly: false,\n\t});\n\n\tdatabase.exec(`\n CREATE TABLE foo (\n id TEXT PRIMARY KEY,\n data BLOB NOT NULL\n ) strict; \n `);\n\n\tconst db = new Kysely<MockSchema>({\n\t\tdialect: createDialect({\n\t\t\tdatabase,\n\t\t}),\n\t\tplugins: [new JsonbPlugin({ database })],\n\t});\n\n\tconst foo = await db\n\t\t.insertInto(\"foo\")\n\t\t.values({\n\t\t\tid: \"mock\",\n\t\t\tdata: {\n\t\t\t\tdata: \"baz\",\n\t\t\t},\n\t\t})\n\t\t.returningAll()\n\t\t.executeTakeFirstOrThrow();\n\n\texpect(foo).toEqual({\n\t\tid: \"mock\",\n\t\tdata: {\n\t\t\tdata: \"baz\",\n\t\t},\n\t});\n});\n\ntest(\"upserts should be handled\", async () => {\n\ttype MockSchema = {\n\t\tfoo: {\n\t\t\tid: string;\n\t\t\tdata: Record<string, any>;\n\t\t};\n\t};\n\tconst database = await createInMemoryDatabase({\n\t\treadOnly: false,\n\t});\n\n\tdatabase.exec(`\n CREATE TABLE foo (\n id TEXT PRIMARY KEY,\n data BLOB NOT NULL\n ) strict; \n `);\n\n\tconst db = new Kysely<MockSchema>({\n\t\tdialect: createDialect({\n\t\t\tdatabase,\n\t\t}),\n\t\tplugins: [\n\t\t\tnew JsonbPlugin({\n\t\t\t\tdatabase,\n\t\t\t}),\n\t\t],\n\t});\n\n\tconst foo = await db\n\t\t.insertInto(\"foo\")\n\t\t.values({\n\t\t\tid: \"mock\",\n\t\t\tdata: {\n\t\t\t\tbar: \"baz\",\n\t\t\t},\n\t\t})\n\t\t.returningAll()\n\t\t.executeTakeFirstOrThrow();\n\n\texpect(foo).toEqual({\n\t\tid: \"mock\",\n\t\tdata: {\n\t\t\tbar: \"baz\",\n\t\t},\n\t});\n\n\tconst updatedFoo = {\n\t\tid: \"mock\",\n\t\tdata: {\n\t\t\tbar: \"baz\",\n\t\t\tbaz: \"qux\",\n\t\t},\n\t};\n\n\tconst updatedFooResult = await db\n\t\t.insertInto(\"foo\")\n\t\t.values(updatedFoo)\n\t\t.returningAll()\n\t\t.onConflict((oc) => oc.column(\"id\").doUpdateSet(updatedFoo))\n\t\t.executeTakeFirstOrThrow();\n\n\texpect(updatedFooResult).toEqual(updatedFoo);\n});\n\ntest(\"storing json as text is supposed to fail to avoid heuristics if the json should be stored as blob or text\", async () => {\n\ttype MockSchema = {\n\t\tfoo: {\n\t\t\tid: string;\n\t\t\tdata: Record<string, any>;\n\t\t};\n\t};\n\tconst database = await createInMemoryDatabase({\n\t\treadOnly: false,\n\t});\n\n\tdatabase.exec(`\n CREATE TABLE foo (\n id TEXT PRIMARY KEY,\n data TEXT NOT NULL\n ) strict; \n `);\n\n\tconst db = new Kysely<MockSchema>({\n\t\tdialect: createDialect({\n\t\t\tdatabase,\n\t\t}),\n\t\tplugins: [new JsonbPlugin({ database })],\n\t});\n\n\texpect(() =>\n\t\tdb\n\t\t\t.insertInto(\"foo\")\n\t\t\t.values({\n\t\t\t\tid: \"mock\",\n\t\t\t\tdata: {\n\t\t\t\t\tbar: \"baz\",\n\t\t\t\t},\n\t\t\t})\n\t\t\t.returningAll()\n\t\t\t.executeTakeFirstOrThrow()\n\t).rejects.toThrowErrorMatchingInlineSnapshot(\n\t\t`[SQLite3Error: SQLITE_CONSTRAINT_DATATYPE: sqlite3 result code 3091: cannot store BLOB value in TEXT column foo.data]`\n\t);\n});\n"]}
|
package/dist/database/schema.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f2febd26-8b4a-5507-b058-13bb83472533")}catch(e){}}();
|
|
3
1
|
import { Declaration, Pattern, VariableReference, } from "../json-schema/pattern.js";
|
|
4
2
|
export function applySchema(args) {
|
|
5
3
|
const foreignKeyActivated = args.sqlite.exec("PRAGMA foreign_keys", {
|
|
@@ -41,5 +39,4 @@ CREATE INDEX IF NOT EXISTS idx_message_bundle_id ON message (bundle_id);
|
|
|
41
39
|
CREATE INDEX IF NOT EXISTS idx_variant_message_id ON variant (message_id);
|
|
42
40
|
`);
|
|
43
41
|
}
|
|
44
|
-
//# sourceMappingURL=schema.js.map
|
|
45
|
-
//# debugId=f2febd26-8b4a-5507-b058-13bb83472533
|
|
42
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sources":["database/schema.ts"],"
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"/","sources":["database/schema.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,WAAW,EACX,OAAO,EACP,iBAAiB,GACjB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,UAAU,WAAW,CAAC,IAAoC;IAC/D,MAAM,mBAAmB,GAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,EAAE;QACxE,WAAW,EAAE,YAAY;KACzB,CAAC,CAAC;IACH;IACC,6BAA6B;IAC7B,gCAAgC;IAChC,gDAAgD;IAChD,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAC9B,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,0BAA0B,EAAE;YAC5C,WAAW,EAAE,YAAY;SACzB,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBf,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { Generated, Insertable, Selectable, Updateable } from \"kysely\";\nimport type { SqliteWasmDatabase } from \"sqlite-wasm-kysely\";\nimport {\n\tDeclaration,\n\tPattern,\n\tVariableReference,\n} from \"../json-schema/pattern.js\";\n\nexport function applySchema(args: { sqlite: SqliteWasmDatabase }) {\n\tconst foreignKeyActivated: any = args.sqlite.exec(\"PRAGMA foreign_keys\", {\n\t\treturnValue: \"resultRows\",\n\t});\n\tif (\n\t\t// first row that is returned\n\t\t// first column of the first row\n\t\t// is equal to 0, then foreign keys are disabled\n\t\tforeignKeyActivated[0][0] === 0\n\t) {\n\t\targs.sqlite.exec(\"PRAGMA foreign_keys = ON\", {\n\t\t\treturnValue: \"resultRows\",\n\t\t});\n\t}\n\n\targs.sqlite.exec(`\nCREATE TABLE IF NOT EXISTS bundle (\n id TEXT PRIMARY KEY DEFAULT (human_id()),\n\tdeclarations BLOB NOT NULL DEFAULT (jsonb('[]'))\n) strict;\n\nCREATE TABLE IF NOT EXISTS message (\n id TEXT PRIMARY KEY DEFAULT (uuid_v7()), \n bundle_id TEXT NOT NULL,\n locale TEXT NOT NULL,\n selectors BLOB NOT NULL DEFAULT (jsonb('[]')),\n FOREIGN KEY (bundle_id) REFERENCES bundle(id) ON DELETE CASCADE\n) strict;\n\n\nCREATE TABLE IF NOT EXISTS variant (\n id TEXT PRIMARY KEY DEFAULT (uuid_v7()), \n message_id TEXT NOT NULL,\n matches BLOB NOT NULL DEFAULT (jsonb('[]')),\n pattern BLOB NOT NULL DEFAULT (jsonb('[]')),\n FOREIGN KEY (message_id) REFERENCES message(id) ON DELETE CASCADE\n) strict;\n \nCREATE INDEX IF NOT EXISTS idx_message_bundle_id ON message (bundle_id);\nCREATE INDEX IF NOT EXISTS idx_variant_message_id ON variant (message_id);\n\t\t`);\n}\n\nexport type InlangDatabaseSchema = {\n\tbundle: BundleTable;\n\tmessage: MessageTable;\n\tvariant: VariantTable;\n};\n\ntype BundleTable = {\n\tid: Generated<string>;\n\tdeclarations: Generated<Array<Declaration>>;\n};\n\ntype MessageTable = {\n\tid: Generated<string>;\n\tbundleId: string;\n\tlocale: string;\n\tselectors: Generated<Array<VariableReference>>;\n};\n\ntype VariantTable = {\n\tid: Generated<string>;\n\tmessageId: string;\n\tmatches: Generated<Array<Match>>;\n\tpattern: Generated<Pattern>;\n};\n\n/**\n * A match is a variable reference that is either a literal or a catch-all.\n *\n * https://github.com/opral/inlang-sdk/issues/205\n *\n * @example\n * match = { type: \"match\", name: \"gender\", value: { type: \"literal\", value: \"male\" }}\n */\nexport type Match = LiteralMatch | CatchAllMatch;\n\nexport type LiteralMatch = {\n\ttype: \"literal-match\";\n\tkey: VariableReference[\"name\"];\n\tvalue: string;\n};\nexport type CatchAllMatch = {\n\ttype: \"catchall-match\";\n\tkey: VariableReference[\"name\"];\n};\n\nexport type Bundle = Selectable<BundleTable>;\nexport type NewBundle = Insertable<BundleTable>;\nexport type BundleUpdate = Updateable<BundleTable>;\n\nexport type Message = Selectable<MessageTable>;\nexport type NewMessage = Insertable<MessageTable>;\nexport type MessageUpdate = Updateable<MessageTable>;\n\nexport type Variant = Selectable<VariantTable>;\nexport type NewVariant = Insertable<VariantTable>;\nexport type VariantUpdate = Updateable<VariantTable>;\n\nexport type MessageNested = Message & {\n\tvariants: Variant[];\n};\nexport type NewMessageNested = NewMessage & {\n\tvariants: NewVariant[];\n};\nexport type MessageNestedUpdate = Updateable<MessageTable> & {\n\tvariants: VariantUpdate[];\n};\n\nexport type BundleNested = Bundle & {\n\tmessages: MessageNested[];\n};\nexport type NewBundleNested = NewBundle & {\n\tmessages: NewMessageNested[];\n};\nexport type BundleNestedUpdate = BundleUpdate & {\n\tmessages: MessageNestedUpdate[];\n};\n"]}
|
package/dist/helper.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="72758e09-d619-5220-a608-230edefa2a5f")}catch(e){}}();
|
|
3
1
|
import { v4 as uuid } from "uuid";
|
|
4
2
|
import { humanId } from "./human-id/human-id.js";
|
|
5
3
|
/**
|
|
@@ -87,5 +85,4 @@ export function toTextElement(text) {
|
|
|
87
85
|
value: text,
|
|
88
86
|
};
|
|
89
87
|
}
|
|
90
|
-
//# sourceMappingURL=helper.js.map
|
|
91
|
-
//# debugId=72758e09-d619-5220-a608-230edefa2a5f
|
|
88
|
+
//# sourceMappingURL=helper.js.map
|
package/dist/helper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sources":["helper.ts"],"
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"/","sources":["helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AASjD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,YAAY,CAAC,IAG5B;IACA,OAAO;QACN,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,OAAO,EAAE;QACxB,QAAQ,EAAE,IAAI,CAAC,QAAQ;KACvB,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,aAAa,CAAC,IAK7B;IACA,MAAM,SAAS,GAAG,IAAI,EAAE,CAAC;IACzB,OAAO;QACN,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,EAAE,EAAE,SAAS;QACb,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE;YACT,aAAa,CAAC;gBACb,SAAS,EAAE,SAAS;gBACpB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,IAAI,CAAC,OAAO;aACrB,CAAC;SACF;KACD,CAAC;AACH,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAAC,IAM7B;IACA,OAAO;QACN,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE;QAC9B,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;QACzC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;KACvE,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAY;IACzC,OAAO;QACN,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,IAAI;KACX,CAAC;AACH,CAAC","sourcesContent":["import { v4 as uuid } from \"uuid\";\nimport type { ProjectSettings } from \"./json-schema/settings.js\";\nimport { humanId } from \"./human-id/human-id.js\";\nimport type {\n\tMatch,\n\tNewBundleNested,\n\tNewMessageNested,\n\tVariant,\n} from \"./database/schema.js\";\nimport type { Text } from \"./json-schema/pattern.js\";\n\n/**\n * create v2 Bundle with a random human ID\n *\n * @deprecated\n *\n * use the database directly\n *\n * - less code because the database has default values\n * - `createMessage` is misleading because it does not treat expressions in the text\n *\n * @example createBundle({\n * messages: [\n * \t\t createMessage({locale: \"en\", text: \"Hello world!\"})\n * \t\t createMessage({locale: \"de\", text: \"Hallo Welt!\"})\n * ]\n * })\n */\nexport function createBundle(args: {\n\tid?: string;\n\tmessages: NewMessageNested[];\n}): NewBundleNested {\n\treturn {\n\t\tid: args.id ?? humanId(),\n\t\tmessages: args.messages,\n\t};\n}\n\n/**\n *\n * @deprecated\n * use the database directly\n *\n * - text will always be a string, no matter\n * if an expression is provided like hello \"{username}\"\n * - the database has default values\n *\n * ```\n * await project.db.insertInto(\"message\").values({\n * \t\tbundleId: \"bundleId\",\n * pattern: []\n * \t\t...\n * })\n * ```\n *\n * create v2 Messsage AST with a randomId, and text-only pattern\n * @example createMessage({locale: \"en\", text: \"Hello world\"})\n */\nexport function createMessage(args: {\n\tbundleId: string;\n\tlocale: ProjectSettings[\"locales\"][number];\n\ttext: string;\n\tmatches?: Match[];\n}): NewMessageNested {\n\tconst messageId = uuid();\n\treturn {\n\t\tbundleId: args.bundleId,\n\t\tid: messageId,\n\t\tlocale: args.locale,\n\t\tselectors: [],\n\t\tvariants: [\n\t\t\tcreateVariant({\n\t\t\t\tmessageId: messageId,\n\t\t\t\ttext: args.text,\n\t\t\t\tmatches: args.matches,\n\t\t\t}),\n\t\t],\n\t};\n}\n\n/**\n *\n * @deprecated\n *\n * use the database directly\n *\n * - less code because the database has default values\n * - `text` is misleading because it does not treat expressions in the text\n *\n * create v2 Variant AST with text-only pattern\n * @example createVariant({match: [\"*\"], text: \"Hello world\"})\n */\nexport function createVariant(args: {\n\tmessageId: string;\n\tid?: string;\n\ttext?: string;\n\tmatches?: Match[];\n\tpattern?: Variant[\"pattern\"];\n}): Variant {\n\treturn {\n\t\tmessageId: args.messageId,\n\t\tid: args.id ? args.id : uuid(),\n\t\tmatches: args.matches ? args.matches : [],\n\t\tpattern: args.pattern ? args.pattern : [toTextElement(args.text ?? \"\")],\n\t};\n}\n\nexport function toTextElement(text: string): Text {\n\treturn {\n\t\ttype: \"text\",\n\t\tvalue: text,\n\t};\n}\n"]}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="bf56aec1-86e6-5dd9-b6fb-e21a5732c0d6")}catch(e){}}();
|
|
3
1
|
import { adjectives, animals, verbs } from "./words.js";
|
|
4
2
|
export function humanId() {
|
|
5
3
|
return `${adjectives[Math.floor(Math.random() * 256)]}_${adjectives[Math.floor(Math.random() * 256)]}_${animals[Math.floor(Math.random() * 256)]}_${verbs[Math.floor(Math.random() * 256)]}`;
|
|
@@ -8,5 +6,4 @@ export function isHumanId(id) {
|
|
|
8
6
|
// naive implementation (good enough for now)
|
|
9
7
|
return id.split("_").length === 4;
|
|
10
8
|
}
|
|
11
|
-
//# sourceMappingURL=human-id.js.map
|
|
12
|
-
//# debugId=bf56aec1-86e6-5dd9-b6fb-e21a5732c0d6
|
|
9
|
+
//# sourceMappingURL=human-id.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"human-id.js","
|
|
1
|
+
{"version":3,"file":"human-id.js","sourceRoot":"/","sources":["human-id/human-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExD,MAAM,UAAU,OAAO;IACtB,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,IACpD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAC3C,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,IAC3C,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CACtC,EAAE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,EAAU;IACnC,6CAA6C;IAC7C,OAAO,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import { adjectives, animals, verbs } from \"./words.js\";\n\nexport function humanId() {\n\treturn `${adjectives[Math.floor(Math.random() * 256)]}_${\n\t\tadjectives[Math.floor(Math.random() * 256)]\n\t}_${animals[Math.floor(Math.random() * 256)]}_${\n\t\tverbs[Math.floor(Math.random() * 256)]\n\t}`;\n}\n\nexport function isHumanId(id: string): boolean {\n\t// naive implementation (good enough for now)\n\treturn id.split(\"_\").length === 4;\n}\n"]}
|
package/dist/human-id/words.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e8972a8a-c3a2-5f74-9499-172808f5a618")}catch(e){}}();
|
|
3
1
|
export const animals = [
|
|
4
2
|
"albatross",
|
|
5
3
|
"alligator",
|
|
@@ -1032,5 +1030,4 @@ export const verbs = [
|
|
|
1032
1030
|
"zip",
|
|
1033
1031
|
"zoom",
|
|
1034
1032
|
];
|
|
1035
|
-
//# sourceMappingURL=words.js.map
|
|
1036
|
-
//# debugId=e8972a8a-c3a2-5f74-9499-172808f5a618
|
|
1033
|
+
//# sourceMappingURL=words.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"words.js","sources":["human-id/words.ts"],"sourceRoot":"/","sourcesContent":["export const animals = [\n\t\"albatross\",\n\t\"alligator\",\n\t\"alpaca\",\n\t\"anaconda\",\n\t\"angelfish\",\n\t\"ant\",\n\t\"anteater\",\n\t\"antelope\",\n\t\"ape\",\n\t\"baboon\",\n\t\"badger\",\n\t\"barbel\",\n\t\"bat\",\n\t\"bear\",\n\t\"beaver\",\n\t\"bee\",\n\t\"beetle\",\n\t\"bird\",\n\t\"bison\",\n\t\"blackbird\",\n\t\"boar\",\n\t\"bobcat\",\n\t\"bulldog\",\n\t\"bullock\",\n\t\"bumblebee\",\n\t\"butterfly\",\n\t\"buzzard\",\n\t\"camel\",\n\t\"canary\",\n\t\"capybara\",\n\t\"carp\",\n\t\"cat\",\n\t\"cheetah\",\n\t\"chicken\",\n\t\"chipmunk\",\n\t\"clownfish\",\n\t\"cobra\",\n\t\"cockroach\",\n\t\"cod\",\n\t\"cougar\",\n\t\"cow\",\n\t\"cowfish\",\n\t\"coyote\",\n\t\"crab\",\n\t\"crocodile\",\n\t\"crossbill\",\n\t\"crow\",\n\t\"cuckoo\",\n\t\"dachshund\",\n\t\"deer\",\n\t\"dingo\",\n\t\"dog\",\n\t\"dolphin\",\n\t\"donkey\",\n\t\"dove\",\n\t\"dragonfly\",\n\t\"duck\",\n\t\"eagle\",\n\t\"earthworm\",\n\t\"eel\",\n\t\"elephant\",\n\t\"elk\",\n\t\"emu\",\n\t\"falcon\",\n\t\"felix\",\n\t\"finch\",\n\t\"fireant\",\n\t\"firefox\",\n\t\"fish\",\n\t\"flamingo\",\n\t\"flea\",\n\t\"florian\",\n\t\"fly\",\n\t\"fox\",\n\t\"frog\",\n\t\"gadfly\",\n\t\"gazelle\",\n\t\"gecko\",\n\t\"gibbon\",\n\t\"giraffe\",\n\t\"goat\",\n\t\"goldfish\",\n\t\"goose\",\n\t\"gopher\",\n\t\"gorilla\",\n\t\"grebe\",\n\t\"grizzly\",\n\t\"gull\",\n\t\"guppy\",\n\t\"haddock\",\n\t\"halibut\",\n\t\"hamster\",\n\t\"hare\",\n\t\"hawk\",\n\t\"hedgehog\",\n\t\"herring\",\n\t\"hornet\",\n\t\"horse\",\n\t\"hound\",\n\t\"husky\",\n\t\"hyena\",\n\t\"ibex\",\n\t\"iguana\",\n\t\"impala\",\n\t\"insect\",\n\t\"jackal\",\n\t\"jackdaw\",\n\t\"jaguar\",\n\t\"jan\",\n\t\"jannes\",\n\t\"javelina\",\n\t\"jay\",\n\t\"jellyfish\",\n\t\"jurgen\",\n\t\"kangaroo\",\n\t\"kestrel\",\n\t\"kitten\",\n\t\"koala\",\n\t\"kudu\",\n\t\"ladybug\",\n\t\"lamb\",\n\t\"lark\",\n\t\"larva\",\n\t\"lemming\",\n\t\"lemur\",\n\t\"leopard\",\n\t\"liger\",\n\t\"lion\",\n\t\"lionfish\",\n\t\"lizard\",\n\t\"llama\",\n\t\"lobster\",\n\t\"loris\",\n\t\"lynx\",\n\t\"macaw\",\n\t\"maggot\",\n\t\"mallard\",\n\t\"mammoth\",\n\t\"manatee\",\n\t\"mantis\",\n\t\"mare\",\n\t\"marlin\",\n\t\"marmot\",\n\t\"marten\",\n\t\"martin\",\n\t\"mayfly\",\n\t\"meerkat\",\n\t\"midge\",\n\t\"millipede\",\n\t\"mink\",\n\t\"mole\",\n\t\"mongoose\",\n\t\"monkey\",\n\t\"moose\",\n\t\"moth\",\n\t\"mouse\",\n\t\"mule\",\n\t\"myna\",\n\t\"newt\",\n\t\"niklas\",\n\t\"nils\",\n\t\"nuthatch\",\n\t\"ocelot\",\n\t\"octopus\",\n\t\"okapi\",\n\t\"opossum\",\n\t\"orangutan\",\n\t\"oryx\",\n\t\"osprey\",\n\t\"ostrich\",\n\t\"otter\",\n\t\"owl\",\n\t\"ox\",\n\t\"panda\",\n\t\"panther\",\n\t\"parakeet\",\n\t\"parrot\",\n\t\"peacock\",\n\t\"pelican\",\n\t\"penguin\",\n\t\"pig\",\n\t\"pigeon\",\n\t\"piranha\",\n\t\"platypus\",\n\t\"polecat\",\n\t\"pony\",\n\t\"poodle\",\n\t\"porpoise\",\n\t\"puffin\",\n\t\"pug\",\n\t\"puma\",\n\t\"quail\",\n\t\"rabbit\",\n\t\"racoon\",\n\t\"rat\",\n\t\"raven\",\n\t\"ray\",\n\t\"reindeer\",\n\t\"robin\",\n\t\"rook\",\n\t\"rooster\",\n\t\"salmon\",\n\t\"samuel\",\n\t\"sawfish\",\n\t\"scallop\",\n\t\"seahorse\",\n\t\"seal\",\n\t\"shad\",\n\t\"shark\",\n\t\"sheep\",\n\t\"shell\",\n\t\"shrike\",\n\t\"shrimp\",\n\t\"skate\",\n\t\"skunk\",\n\t\"sloth\",\n\t\"slug\",\n\t\"snail\",\n\t\"snake\",\n\t\"sparrow\",\n\t\"spider\",\n\t\"squid\",\n\t\"squirrel\",\n\t\"starfish\",\n\t\"stingray\",\n\t\"stork\",\n\t\"swallow\",\n\t\"swan\",\n\t\"tadpole\",\n\t\"tapir\",\n\t\"termite\",\n\t\"tern\",\n\t\"thrush\",\n\t\"tiger\",\n\t\"toad\",\n\t\"tortoise\",\n\t\"toucan\",\n\t\"trout\",\n\t\"tuna\",\n\t\"turkey\",\n\t\"turtle\",\n\t\"vole\",\n\t\"vulture\",\n\t\"wallaby\",\n\t\"walrus\",\n\t\"warbler\",\n\t\"warthog\",\n\t\"wasp\",\n\t\"weasel\",\n\t\"whale\",\n\t\"wolf\",\n\t\"wombat\",\n\t\"worm\",\n\t\"wren\",\n\t\"yak\",\n\t\"zebra\",\n];\n\nexport const adjectives = [\n\t\"acidic\",\n\t\"active\",\n\t\"actual\",\n\t\"agent\",\n\t\"ago\",\n\t\"alert\",\n\t\"alive\",\n\t\"aloof\",\n\t\"antsy\",\n\t\"any\",\n\t\"aqua\",\n\t\"arable\",\n\t\"awake\",\n\t\"aware\",\n\t\"away\",\n\t\"awful\",\n\t\"bad\",\n\t\"bald\",\n\t\"basic\",\n\t\"best\",\n\t\"big\",\n\t\"bland\",\n\t\"blue\",\n\t\"bold\",\n\t\"born\",\n\t\"brave\",\n\t\"brief\",\n\t\"bright\",\n\t\"broad\",\n\t\"busy\",\n\t\"calm\",\n\t\"candid\",\n\t\"careful\",\n\t\"caring\",\n\t\"chunky\",\n\t\"civil\",\n\t\"clean\",\n\t\"clear\",\n\t\"close\",\n\t\"cool\",\n\t\"cozy\",\n\t\"crazy\",\n\t\"crisp\",\n\t\"cuddly\",\n\t\"curly\",\n\t\"cute\",\n\t\"dark\",\n\t\"day\",\n\t\"deft\",\n\t\"direct\",\n\t\"dirty\",\n\t\"dizzy\",\n\t\"drab\",\n\t\"dry\",\n\t\"due\",\n\t\"dull\",\n\t\"each\",\n\t\"early\",\n\t\"east\",\n\t\"elegant\",\n\t\"empty\",\n\t\"equal\",\n\t\"even\",\n\t\"every\",\n\t\"extra\",\n\t\"factual\",\n\t\"fair\",\n\t\"fancy\",\n\t\"few\",\n\t\"fine\",\n\t\"fit\",\n\t\"flaky\",\n\t\"flat\",\n\t\"fluffy\",\n\t\"formal\",\n\t\"frail\",\n\t\"free\",\n\t\"fresh\",\n\t\"front\",\n\t\"full\",\n\t\"fun\",\n\t\"funny\",\n\t\"fuzzy\",\n\t\"game\",\n\t\"gaudy\",\n\t\"giant\",\n\t\"glad\",\n\t\"good\",\n\t\"grand\",\n\t\"grassy\",\n\t\"gray\",\n\t\"great\",\n\t\"green\",\n\t\"gross\",\n\t\"happy\",\n\t\"heavy\",\n\t\"helpful\",\n\t\"heroic\",\n\t\"home\",\n\t\"honest\",\n\t\"hour\",\n\t\"house\",\n\t\"icy\",\n\t\"ideal\",\n\t\"inclusive\",\n\t\"inner\",\n\t\"jolly\",\n\t\"jumpy\",\n\t\"just\",\n\t\"keen\",\n\t\"key\",\n\t\"kind\",\n\t\"knotty\",\n\t\"known\",\n\t\"large\",\n\t\"last\",\n\t\"late\",\n\t\"lazy\",\n\t\"least\",\n\t\"left\",\n\t\"legal\",\n\t\"less\",\n\t\"level\",\n\t\"light\",\n\t\"lime\",\n\t\"livid\",\n\t\"lofty\",\n\t\"long\",\n\t\"loose\",\n\t\"lost\",\n\t\"loud\",\n\t\"loved\",\n\t\"low\",\n\t\"lower\",\n\t\"lucky\",\n\t\"mad\",\n\t\"main\",\n\t\"major\",\n\t\"male\",\n\t\"many\",\n\t\"maroon\",\n\t\"mealy\",\n\t\"mean\",\n\t\"mellow\",\n\t\"merry\",\n\t\"mild\",\n\t\"minor\",\n\t\"misty\",\n\t\"moving\",\n\t\"muddy\",\n\t\"mushy\",\n\t\"neat\",\n\t\"new\",\n\t\"next\",\n\t\"nice\",\n\t\"nimble\",\n\t\"noble\",\n\t\"noisy\",\n\t\"north\",\n\t\"novel\",\n\t\"odd\",\n\t\"ok\",\n\t\"only\",\n\t\"orange\",\n\t\"ornate\",\n\t\"patchy\",\n\t\"patient\",\n\t\"petty\",\n\t\"pink\",\n\t\"plain\",\n\t\"plane\",\n\t\"polite\",\n\t\"pretty\",\n\t\"proof\",\n\t\"proud\",\n\t\"quaint\",\n\t\"quick\",\n\t\"quiet\",\n\t\"raw\",\n\t\"real\",\n\t\"red\",\n\t\"round\",\n\t\"royal\",\n\t\"sad\",\n\t\"safe\",\n\t\"salty\",\n\t\"same\",\n\t\"sea\",\n\t\"seemly\",\n\t\"sharp\",\n\t\"short\",\n\t\"shy\",\n\t\"silly\",\n\t\"simple\",\n\t\"sleek\",\n\t\"slimy\",\n\t\"slow\",\n\t\"small\",\n\t\"smart\",\n\t\"smug\",\n\t\"soft\",\n\t\"solid\",\n\t\"sound\",\n\t\"sour\",\n\t\"spare\",\n\t\"spicy\",\n\t\"spry\",\n\t\"stale\",\n\t\"steep\",\n\t\"still\",\n\t\"stock\",\n\t\"stout\",\n\t\"strong\",\n\t\"suave\",\n\t\"such\",\n\t\"sunny\",\n\t\"super\",\n\t\"sweet\",\n\t\"swift\",\n\t\"tame\",\n\t\"tangy\",\n\t\"tasty\",\n\t\"teal\",\n\t\"teary\",\n\t\"tense\",\n\t\"that\",\n\t\"these\",\n\t\"this\",\n\t\"tidy\",\n\t\"tiny\",\n\t\"tired\",\n\t\"top\",\n\t\"topical\",\n\t\"tough\",\n\t\"trick\",\n\t\"trite\",\n\t\"true\",\n\t\"upper\",\n\t\"vexed\",\n\t\"vivid\",\n\t\"wacky\",\n\t\"warm\",\n\t\"watery\",\n\t\"weak\",\n\t\"weary\",\n\t\"weird\",\n\t\"white\",\n\t\"whole\",\n\t\"wide\",\n\t\"wild\",\n\t\"wise\",\n\t\"witty\",\n\t\"yummy\",\n\t\"zany\",\n\t\"zesty\",\n\t\"zippy\",\n];\n\nexport const adverbs = [\n\t\"ablaze\",\n\t\"about\",\n\t\"above\",\n\t\"abroad\",\n\t\"across\",\n\t\"adrift\",\n\t\"afloat\",\n\t\"after\",\n\t\"again\",\n\t\"ahead\",\n\t\"alike\",\n\t\"all\",\n\t\"almost\",\n\t\"alone\",\n\t\"along\",\n\t\"aloud\",\n\t\"always\",\n\t\"amazing\",\n\t\"anxious\",\n\t\"anywhere\",\n\t\"apart\",\n\t\"around\",\n\t\"arrogant\",\n\t\"aside\",\n\t\"asleep\",\n\t\"awkward\",\n\t\"back\",\n\t\"bashful\",\n\t\"beautiful\",\n\t\"before\",\n\t\"behind\",\n\t\"below\",\n\t\"beside\",\n\t\"besides\",\n\t\"beyond\",\n\t\"bitter\",\n\t\"bleak\",\n\t\"blissful\",\n\t\"boldly\",\n\t\"bravely\",\n\t\"briefly\",\n\t\"brightly\",\n\t\"brisk\",\n\t\"busily\",\n\t\"calmly\",\n\t\"carefully\",\n\t\"careless\",\n\t\"cautious\",\n\t\"certain\",\n\t\"cheerful\",\n\t\"clearly\",\n\t\"clever\",\n\t\"closely\",\n\t\"closer\",\n\t\"colorful\",\n\t\"common\",\n\t\"correct\",\n\t\"cross\",\n\t\"cruel\",\n\t\"curious\",\n\t\"daily\",\n\t\"dainty\",\n\t\"daring\",\n\t\"dear\",\n\t\"desperate\",\n\t\"diligent\",\n\t\"doubtful\",\n\t\"doubtless\",\n\t\"down\",\n\t\"downwards\",\n\t\"dreamily\",\n\t\"eager\",\n\t\"easily\",\n\t\"either\",\n\t\"elegantly\",\n\t\"else\",\n\t\"elsewhere\",\n\t\"enormous\",\n\t\"enough\",\n\t\"ever\",\n\t\"famous\",\n\t\"far\",\n\t\"fast\",\n\t\"fervent\",\n\t\"fierce\",\n\t\"fondly\",\n\t\"foolish\",\n\t\"forever\",\n\t\"forth\",\n\t\"fortunate\",\n\t\"forward\",\n\t\"frank\",\n\t\"freely\",\n\t\"frequent\",\n\t\"fully\",\n\t\"general\",\n\t\"generous\",\n\t\"gladly\",\n\t\"graceful\",\n\t\"grateful\",\n\t\"gratis\",\n\t\"half\",\n\t\"happily\",\n\t\"hard\",\n\t\"harsh\",\n\t\"hearty\",\n\t\"helpless\",\n\t\"here\",\n\t\"highly\",\n\t\"hitherto\",\n\t\"how\",\n\t\"however\",\n\t\"hurried\",\n\t\"immediate\",\n\t\"in\",\n\t\"indeed\",\n\t\"inland\",\n\t\"innocent\",\n\t\"inside\",\n\t\"instant\",\n\t\"intense\",\n\t\"inward\",\n\t\"jealous\",\n\t\"jovial\",\n\t\"joyful\",\n\t\"jubilant\",\n\t\"keenly\",\n\t\"kindly\",\n\t\"knowing\",\n\t\"lately\",\n\t\"lazily\",\n\t\"lightly\",\n\t\"likely\",\n\t\"little\",\n\t\"live\",\n\t\"loftily\",\n\t\"longing\",\n\t\"loosely\",\n\t\"loudly\",\n\t\"loving\",\n\t\"loyal\",\n\t\"luckily\",\n\t\"madly\",\n\t\"maybe\",\n\t\"meanwhile\",\n\t\"mocking\",\n\t\"monthly\",\n\t\"moreover\",\n\t\"much\",\n\t\"near\",\n\t\"neatly\",\n\t\"neither\",\n\t\"nervous\",\n\t\"never\",\n\t\"noisily\",\n\t\"normal\",\n\t\"not\",\n\t\"now\",\n\t\"nowadays\",\n\t\"nowhere\",\n\t\"oddly\",\n\t\"off\",\n\t\"official\",\n\t\"often\",\n\t\"on\",\n\t\"once\",\n\t\"open\",\n\t\"openly\",\n\t\"opposite\",\n\t\"otherwise\",\n\t\"out\",\n\t\"outside\",\n\t\"over\",\n\t\"overall\",\n\t\"overhead\",\n\t\"overnight\",\n\t\"overseas\",\n\t\"parallel\",\n\t\"partial\",\n\t\"past\",\n\t\"patiently\",\n\t\"perfect\",\n\t\"perhaps\",\n\t\"physical\",\n\t\"playful\",\n\t\"politely\",\n\t\"potential\",\n\t\"powerful\",\n\t\"presto\",\n\t\"profound\",\n\t\"prompt\",\n\t\"proper\",\n\t\"proudly\",\n\t\"punctual\",\n\t\"quickly\",\n\t\"quizzical\",\n\t\"rare\",\n\t\"ravenous\",\n\t\"ready\",\n\t\"really\",\n\t\"reckless\",\n\t\"regular\",\n\t\"repeated\",\n\t\"restful\",\n\t\"rightful\",\n\t\"rigid\",\n\t\"rude\",\n\t\"sadly\",\n\t\"safely\",\n\t\"scarce\",\n\t\"scary\",\n\t\"searching\",\n\t\"seeming\",\n\t\"seldom\",\n\t\"selfish\",\n\t\"separate\",\n\t\"serious\",\n\t\"shaky\",\n\t\"sheepish\",\n\t\"silent\",\n\t\"sleepy\",\n\t\"smooth\",\n\t\"softly\",\n\t\"solemn\",\n\t\"solidly\",\n\t\"sometimes\",\n\t\"speedy\",\n\t\"stealthy\",\n\t\"stern\",\n\t\"strict\",\n\t\"stubborn\",\n\t\"sudden\",\n\t\"supposed\",\n\t\"sweetly\",\n\t\"swiftly\",\n\t\"tender\",\n\t\"tensely\",\n\t\"thankful\",\n\t\"tight\",\n\t\"too\",\n\t\"twice\",\n\t\"under\",\n\t\"untrue\",\n\t\"uphill\",\n\t\"upward\",\n\t\"vaguely\",\n\t\"vainly\",\n\t\"vastly\",\n\t\"warmly\",\n\t\"wearily\",\n\t\"weekly\",\n\t\"well\",\n\t\"wisely\",\n\t\"within\",\n\t\"wrongly\",\n\t\"yonder\",\n];\n\nexport const verbs = [\n\t\"absorb\",\n\t\"accept\",\n\t\"achieve\",\n\t\"adapt\",\n\t\"adore\",\n\t\"advise\",\n\t\"affirm\",\n\t\"agree\",\n\t\"aid\",\n\t\"aim\",\n\t\"amaze\",\n\t\"amuse\",\n\t\"animate\",\n\t\"approve\",\n\t\"arise\",\n\t\"arrive\",\n\t\"ascend\",\n\t\"ask\",\n\t\"aspire\",\n\t\"assure\",\n\t\"attend\",\n\t\"bake\",\n\t\"bask\",\n\t\"beam\",\n\t\"believe\",\n\t\"belong\",\n\t\"bend\",\n\t\"blend\",\n\t\"bless\",\n\t\"blink\",\n\t\"bloom\",\n\t\"boil\",\n\t\"boost\",\n\t\"borrow\",\n\t\"breathe\",\n\t\"bubble\",\n\t\"build\",\n\t\"bump\",\n\t\"burn\",\n\t\"buy\",\n\t\"buzz\",\n\t\"care\",\n\t\"catch\",\n\t\"charm\",\n\t\"cheer\",\n\t\"cherish\",\n\t\"chop\",\n\t\"clap\",\n\t\"clasp\",\n\t\"climb\",\n\t\"clip\",\n\t\"coax\",\n\t\"comfort\",\n\t\"commend\",\n\t\"compose\",\n\t\"conquer\",\n\t\"cook\",\n\t\"create\",\n\t\"cry\",\n\t\"cuddle\",\n\t\"cure\",\n\t\"cut\",\n\t\"dance\",\n\t\"dare\",\n\t\"dart\",\n\t\"dash\",\n\t\"dazzle\",\n\t\"delight\",\n\t\"devour\",\n\t\"dial\",\n\t\"dig\",\n\t\"dine\",\n\t\"dream\",\n\t\"drip\",\n\t\"drop\",\n\t\"drum\",\n\t\"dust\",\n\t\"earn\",\n\t\"edit\",\n\t\"embrace\",\n\t\"emerge\",\n\t\"empower\",\n\t\"enchant\",\n\t\"endure\",\n\t\"engage\",\n\t\"enjoy\",\n\t\"enrich\",\n\t\"evoke\",\n\t\"exhale\",\n\t\"expand\",\n\t\"explore\",\n\t\"express\",\n\t\"fade\",\n\t\"fall\",\n\t\"favor\",\n\t\"fear\",\n\t\"feast\",\n\t\"feel\",\n\t\"fetch\",\n\t\"file\",\n\t\"find\",\n\t\"flip\",\n\t\"flop\",\n\t\"flow\",\n\t\"fold\",\n\t\"fond\",\n\t\"forgive\",\n\t\"foster\",\n\t\"fry\",\n\t\"fulfill\",\n\t\"gasp\",\n\t\"gaze\",\n\t\"gleam\",\n\t\"glow\",\n\t\"grace\",\n\t\"grasp\",\n\t\"greet\",\n\t\"grin\",\n\t\"grip\",\n\t\"grow\",\n\t\"gulp\",\n\t\"hack\",\n\t\"harbor\",\n\t\"heal\",\n\t\"heart\",\n\t\"hike\",\n\t\"hint\",\n\t\"honor\",\n\t\"hope\",\n\t\"hug\",\n\t\"hunt\",\n\t\"hurl\",\n\t\"hush\",\n\t\"imagine\",\n\t\"inspire\",\n\t\"intend\",\n\t\"jest\",\n\t\"jolt\",\n\t\"jump\",\n\t\"kick\",\n\t\"kiss\",\n\t\"laugh\",\n\t\"launch\",\n\t\"lead\",\n\t\"leap\",\n\t\"learn\",\n\t\"lend\",\n\t\"lift\",\n\t\"link\",\n\t\"list\",\n\t\"lock\",\n\t\"loop\",\n\t\"love\",\n\t\"mend\",\n\t\"mix\",\n\t\"mop\",\n\t\"nail\",\n\t\"nourish\",\n\t\"nudge\",\n\t\"nurture\",\n\t\"offer\",\n\t\"pat\",\n\t\"pause\",\n\t\"pave\",\n\t\"peek\",\n\t\"peel\",\n\t\"persist\",\n\t\"pet\",\n\t\"pick\",\n\t\"pinch\",\n\t\"play\",\n\t\"pop\",\n\t\"pout\",\n\t\"praise\",\n\t\"pray\",\n\t\"pride\",\n\t\"promise\",\n\t\"propel\",\n\t\"prosper\",\n\t\"pull\",\n\t\"push\",\n\t\"quell\",\n\t\"quiz\",\n\t\"race\",\n\t\"radiate\",\n\t\"read\",\n\t\"reap\",\n\t\"relish\",\n\t\"renew\",\n\t\"reside\",\n\t\"rest\",\n\t\"revive\",\n\t\"ripple\",\n\t\"rise\",\n\t\"roam\",\n\t\"roar\",\n\t\"rush\",\n\t\"sail\",\n\t\"savor\",\n\t\"scold\",\n\t\"scoop\",\n\t\"seek\",\n\t\"sew\",\n\t\"shine\",\n\t\"sing\",\n\t\"skip\",\n\t\"slide\",\n\t\"slurp\",\n\t\"smile\",\n\t\"snap\",\n\t\"snip\",\n\t\"soar\",\n\t\"spark\",\n\t\"spin\",\n\t\"splash\",\n\t\"sprout\",\n\t\"spur\",\n\t\"stab\",\n\t\"startle\",\n\t\"stir\",\n\t\"stop\",\n\t\"strive\",\n\t\"succeed\",\n\t\"support\",\n\t\"surge\",\n\t\"sway\",\n\t\"swim\",\n\t\"talk\",\n\t\"tap\",\n\t\"taste\",\n\t\"tear\",\n\t\"tend\",\n\t\"thrive\",\n\t\"tickle\",\n\t\"transform\",\n\t\"treasure\",\n\t\"treat\",\n\t\"trim\",\n\t\"trip\",\n\t\"trust\",\n\t\"twirl\",\n\t\"twist\",\n\t\"type\",\n\t\"urge\",\n\t\"value\",\n\t\"vent\",\n\t\"view\",\n\t\"walk\",\n\t\"wave\",\n\t\"win\",\n\t\"wish\",\n\t\"work\",\n\t\"yell\",\n\t\"zap\",\n\t\"zip\",\n\t\"zoom\",\n];\n"],"names":[],"mappings":";;AAAA,MAAM,CAAC,MAAM,OAAO,GAAG;IACtB,WAAW;IACX,WAAW;IACX,QAAQ;IACR,UAAU;IACV,WAAW;IACX,KAAK;IACL,UAAU;IACV,UAAU;IACV,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,MAAM;IACN,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACP,WAAW;IACX,MAAM;IACN,QAAQ;IACR,SAAS;IACT,SAAS;IACT,WAAW;IACX,WAAW;IACX,SAAS;IACT,OAAO;IACP,QAAQ;IACR,UAAU;IACV,MAAM;IACN,KAAK;IACL,SAAS;IACT,SAAS;IACT,UAAU;IACV,WAAW;IACX,OAAO;IACP,WAAW;IACX,KAAK;IACL,QAAQ;IACR,KAAK;IACL,SAAS;IACT,QAAQ;IACR,MAAM;IACN,WAAW;IACX,WAAW;IACX,M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,KAAK;IACL,MAAM;IACN,SAAS;IACT,OAAO;IACP,SAAS;IACT,OAAO;IACP,KAAK;IACL,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,SAAS;IACT,KAAK;IACL,MAAM;IACN,OAAO;IACP,MAAM;IACN,KAAK;IACL,MAAM;IACN,QAAQ;IACR,MAAM;IACN,OAAO;IACP,SAAS;IACT,QAAQ;IACR,SAAS;IACT,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,SAAS;IACT,MAAM;IACN,MAAM;IACN,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,MAAM;IACN,SAAS;IACT,MAAM;IACN,MAAM;IACN,QAAQ;IACR,SAAS;IACT,SAAS;IACT,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;IACN,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,UAAU;IACV,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;CACN,CAAC","debug_id":"e8972a8a-c3a2-5f74-9499-172808f5a618"}
|
|
1
|
+
{"version":3,"file":"words.js","sourceRoot":"/","sources":["human-id/words.ts"],"names":[],"mappings":"AAAA,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AM;IACN,SAAS;IACT,MAAM;IACN,MAAM;IACN,QAAQ;IACR,SAAS;IACT,SAAS;IACT,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;IACN,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,UAAU;IACV,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;CACN,CAAC","sourcesContent":["export const animals = [\n\t\"albatross\",\n\t\"alligator\",\n\t\"alpaca\",\n\t\"anaconda\",\n\t\"angelfish\",\n\t\"ant\",\n\t\"anteater\",\n\t\"antelope\",\n\t\"ape\",\n\t\"baboon\",\n\t\"badger\",\n\t\"barbel\",\n\t\"bat\",\n\t\"bear\",\n\t\"beaver\",\n\t\"bee\",\n\t\"beetle\",\n\t\"bird\",\n\t\"bison\",\n\t\"blackbird\",\n\t\"boar\",\n\t\"bobcat\",\n\t\"bulldog\",\n\t\"bullock\",\n\t\"bumblebee\",\n\t\"butterfly\",\n\t\"buzzard\",\n\t\"camel\",\n\t\"canary\",\n\t\"capybara\",\n\t\"carp\",\n\t\"cat\",\n\t\"cheetah\",\n\t\"chicken\",\n\t\"chipmunk\",\n\t\"clownfish\",\n\t\"cobra\",\n\t\"cockroach\",\n\t\"cod\",\n\t\"cougar\",\n\t\"cow\",\n\t\"cowfish\",\n\t\"coyote\",\n\t\"crab\",\n\t\"crocodile\",\n\t\"crossbill\",\n\t\"crow\",\n\t\"cuckoo\",\n\t\"dachshund\",\n\t\"deer\",\n\t\"dingo\",\n\t\"dog\",\n\t\"dolphin\",\n\t\"donkey\",\n\t\"dove\",\n\t\"dragonfly\",\n\t\"duck\",\n\t\"eagle\",\n\t\"earthworm\",\n\t\"eel\",\n\t\"elephant\",\n\t\"elk\",\n\t\"emu\",\n\t\"falcon\",\n\t\"felix\",\n\t\"finch\",\n\t\"fireant\",\n\t\"firefox\",\n\t\"fish\",\n\t\"flamingo\",\n\t\"flea\",\n\t\"florian\",\n\t\"fly\",\n\t\"fox\",\n\t\"frog\",\n\t\"gadfly\",\n\t\"gazelle\",\n\t\"gecko\",\n\t\"gibbon\",\n\t\"giraffe\",\n\t\"goat\",\n\t\"goldfish\",\n\t\"goose\",\n\t\"gopher\",\n\t\"gorilla\",\n\t\"grebe\",\n\t\"grizzly\",\n\t\"gull\",\n\t\"guppy\",\n\t\"haddock\",\n\t\"halibut\",\n\t\"hamster\",\n\t\"hare\",\n\t\"hawk\",\n\t\"hedgehog\",\n\t\"herring\",\n\t\"hornet\",\n\t\"horse\",\n\t\"hound\",\n\t\"husky\",\n\t\"hyena\",\n\t\"ibex\",\n\t\"iguana\",\n\t\"impala\",\n\t\"insect\",\n\t\"jackal\",\n\t\"jackdaw\",\n\t\"jaguar\",\n\t\"jan\",\n\t\"jannes\",\n\t\"javelina\",\n\t\"jay\",\n\t\"jellyfish\",\n\t\"jurgen\",\n\t\"kangaroo\",\n\t\"kestrel\",\n\t\"kitten\",\n\t\"koala\",\n\t\"kudu\",\n\t\"ladybug\",\n\t\"lamb\",\n\t\"lark\",\n\t\"larva\",\n\t\"lemming\",\n\t\"lemur\",\n\t\"leopard\",\n\t\"liger\",\n\t\"lion\",\n\t\"lionfish\",\n\t\"lizard\",\n\t\"llama\",\n\t\"lobster\",\n\t\"loris\",\n\t\"lynx\",\n\t\"macaw\",\n\t\"maggot\",\n\t\"mallard\",\n\t\"mammoth\",\n\t\"manatee\",\n\t\"mantis\",\n\t\"mare\",\n\t\"marlin\",\n\t\"marmot\",\n\t\"marten\",\n\t\"martin\",\n\t\"mayfly\",\n\t\"meerkat\",\n\t\"midge\",\n\t\"millipede\",\n\t\"mink\",\n\t\"mole\",\n\t\"mongoose\",\n\t\"monkey\",\n\t\"moose\",\n\t\"moth\",\n\t\"mouse\",\n\t\"mule\",\n\t\"myna\",\n\t\"newt\",\n\t\"niklas\",\n\t\"nils\",\n\t\"nuthatch\",\n\t\"ocelot\",\n\t\"octopus\",\n\t\"okapi\",\n\t\"opossum\",\n\t\"orangutan\",\n\t\"oryx\",\n\t\"osprey\",\n\t\"ostrich\",\n\t\"otter\",\n\t\"owl\",\n\t\"ox\",\n\t\"panda\",\n\t\"panther\",\n\t\"parakeet\",\n\t\"parrot\",\n\t\"peacock\",\n\t\"pelican\",\n\t\"penguin\",\n\t\"pig\",\n\t\"pigeon\",\n\t\"piranha\",\n\t\"platypus\",\n\t\"polecat\",\n\t\"pony\",\n\t\"poodle\",\n\t\"porpoise\",\n\t\"puffin\",\n\t\"pug\",\n\t\"puma\",\n\t\"quail\",\n\t\"rabbit\",\n\t\"racoon\",\n\t\"rat\",\n\t\"raven\",\n\t\"ray\",\n\t\"reindeer\",\n\t\"robin\",\n\t\"rook\",\n\t\"rooster\",\n\t\"salmon\",\n\t\"samuel\",\n\t\"sawfish\",\n\t\"scallop\",\n\t\"seahorse\",\n\t\"seal\",\n\t\"shad\",\n\t\"shark\",\n\t\"sheep\",\n\t\"shell\",\n\t\"shrike\",\n\t\"shrimp\",\n\t\"skate\",\n\t\"skunk\",\n\t\"sloth\",\n\t\"slug\",\n\t\"snail\",\n\t\"snake\",\n\t\"sparrow\",\n\t\"spider\",\n\t\"squid\",\n\t\"squirrel\",\n\t\"starfish\",\n\t\"stingray\",\n\t\"stork\",\n\t\"swallow\",\n\t\"swan\",\n\t\"tadpole\",\n\t\"tapir\",\n\t\"termite\",\n\t\"tern\",\n\t\"thrush\",\n\t\"tiger\",\n\t\"toad\",\n\t\"tortoise\",\n\t\"toucan\",\n\t\"trout\",\n\t\"tuna\",\n\t\"turkey\",\n\t\"turtle\",\n\t\"vole\",\n\t\"vulture\",\n\t\"wallaby\",\n\t\"walrus\",\n\t\"warbler\",\n\t\"warthog\",\n\t\"wasp\",\n\t\"weasel\",\n\t\"whale\",\n\t\"wolf\",\n\t\"wombat\",\n\t\"worm\",\n\t\"wren\",\n\t\"yak\",\n\t\"zebra\",\n];\n\nexport const adjectives = [\n\t\"acidic\",\n\t\"active\",\n\t\"actual\",\n\t\"agent\",\n\t\"ago\",\n\t\"alert\",\n\t\"alive\",\n\t\"aloof\",\n\t\"antsy\",\n\t\"any\",\n\t\"aqua\",\n\t\"arable\",\n\t\"awake\",\n\t\"aware\",\n\t\"away\",\n\t\"awful\",\n\t\"bad\",\n\t\"bald\",\n\t\"basic\",\n\t\"best\",\n\t\"big\",\n\t\"bland\",\n\t\"blue\",\n\t\"bold\",\n\t\"born\",\n\t\"brave\",\n\t\"brief\",\n\t\"bright\",\n\t\"broad\",\n\t\"busy\",\n\t\"calm\",\n\t\"candid\",\n\t\"careful\",\n\t\"caring\",\n\t\"chunky\",\n\t\"civil\",\n\t\"clean\",\n\t\"clear\",\n\t\"close\",\n\t\"cool\",\n\t\"cozy\",\n\t\"crazy\",\n\t\"crisp\",\n\t\"cuddly\",\n\t\"curly\",\n\t\"cute\",\n\t\"dark\",\n\t\"day\",\n\t\"deft\",\n\t\"direct\",\n\t\"dirty\",\n\t\"dizzy\",\n\t\"drab\",\n\t\"dry\",\n\t\"due\",\n\t\"dull\",\n\t\"each\",\n\t\"early\",\n\t\"east\",\n\t\"elegant\",\n\t\"empty\",\n\t\"equal\",\n\t\"even\",\n\t\"every\",\n\t\"extra\",\n\t\"factual\",\n\t\"fair\",\n\t\"fancy\",\n\t\"few\",\n\t\"fine\",\n\t\"fit\",\n\t\"flaky\",\n\t\"flat\",\n\t\"fluffy\",\n\t\"formal\",\n\t\"frail\",\n\t\"free\",\n\t\"fresh\",\n\t\"front\",\n\t\"full\",\n\t\"fun\",\n\t\"funny\",\n\t\"fuzzy\",\n\t\"game\",\n\t\"gaudy\",\n\t\"giant\",\n\t\"glad\",\n\t\"good\",\n\t\"grand\",\n\t\"grassy\",\n\t\"gray\",\n\t\"great\",\n\t\"green\",\n\t\"gross\",\n\t\"happy\",\n\t\"heavy\",\n\t\"helpful\",\n\t\"heroic\",\n\t\"home\",\n\t\"honest\",\n\t\"hour\",\n\t\"house\",\n\t\"icy\",\n\t\"ideal\",\n\t\"inclusive\",\n\t\"inner\",\n\t\"jolly\",\n\t\"jumpy\",\n\t\"just\",\n\t\"keen\",\n\t\"key\",\n\t\"kind\",\n\t\"knotty\",\n\t\"known\",\n\t\"large\",\n\t\"last\",\n\t\"late\",\n\t\"lazy\",\n\t\"least\",\n\t\"left\",\n\t\"legal\",\n\t\"less\",\n\t\"level\",\n\t\"light\",\n\t\"lime\",\n\t\"livid\",\n\t\"lofty\",\n\t\"long\",\n\t\"loose\",\n\t\"lost\",\n\t\"loud\",\n\t\"loved\",\n\t\"low\",\n\t\"lower\",\n\t\"lucky\",\n\t\"mad\",\n\t\"main\",\n\t\"major\",\n\t\"male\",\n\t\"many\",\n\t\"maroon\",\n\t\"mealy\",\n\t\"mean\",\n\t\"mellow\",\n\t\"merry\",\n\t\"mild\",\n\t\"minor\",\n\t\"misty\",\n\t\"moving\",\n\t\"muddy\",\n\t\"mushy\",\n\t\"neat\",\n\t\"new\",\n\t\"next\",\n\t\"nice\",\n\t\"nimble\",\n\t\"noble\",\n\t\"noisy\",\n\t\"north\",\n\t\"novel\",\n\t\"odd\",\n\t\"ok\",\n\t\"only\",\n\t\"orange\",\n\t\"ornate\",\n\t\"patchy\",\n\t\"patient\",\n\t\"petty\",\n\t\"pink\",\n\t\"plain\",\n\t\"plane\",\n\t\"polite\",\n\t\"pretty\",\n\t\"proof\",\n\t\"proud\",\n\t\"quaint\",\n\t\"quick\",\n\t\"quiet\",\n\t\"raw\",\n\t\"real\",\n\t\"red\",\n\t\"round\",\n\t\"royal\",\n\t\"sad\",\n\t\"safe\",\n\t\"salty\",\n\t\"same\",\n\t\"sea\",\n\t\"seemly\",\n\t\"sharp\",\n\t\"short\",\n\t\"shy\",\n\t\"silly\",\n\t\"simple\",\n\t\"sleek\",\n\t\"slimy\",\n\t\"slow\",\n\t\"small\",\n\t\"smart\",\n\t\"smug\",\n\t\"soft\",\n\t\"solid\",\n\t\"sound\",\n\t\"sour\",\n\t\"spare\",\n\t\"spicy\",\n\t\"spry\",\n\t\"stale\",\n\t\"steep\",\n\t\"still\",\n\t\"stock\",\n\t\"stout\",\n\t\"strong\",\n\t\"suave\",\n\t\"such\",\n\t\"sunny\",\n\t\"super\",\n\t\"sweet\",\n\t\"swift\",\n\t\"tame\",\n\t\"tangy\",\n\t\"tasty\",\n\t\"teal\",\n\t\"teary\",\n\t\"tense\",\n\t\"that\",\n\t\"these\",\n\t\"this\",\n\t\"tidy\",\n\t\"tiny\",\n\t\"tired\",\n\t\"top\",\n\t\"topical\",\n\t\"tough\",\n\t\"trick\",\n\t\"trite\",\n\t\"true\",\n\t\"upper\",\n\t\"vexed\",\n\t\"vivid\",\n\t\"wacky\",\n\t\"warm\",\n\t\"watery\",\n\t\"weak\",\n\t\"weary\",\n\t\"weird\",\n\t\"white\",\n\t\"whole\",\n\t\"wide\",\n\t\"wild\",\n\t\"wise\",\n\t\"witty\",\n\t\"yummy\",\n\t\"zany\",\n\t\"zesty\",\n\t\"zippy\",\n];\n\nexport const adverbs = [\n\t\"ablaze\",\n\t\"about\",\n\t\"above\",\n\t\"abroad\",\n\t\"across\",\n\t\"adrift\",\n\t\"afloat\",\n\t\"after\",\n\t\"again\",\n\t\"ahead\",\n\t\"alike\",\n\t\"all\",\n\t\"almost\",\n\t\"alone\",\n\t\"along\",\n\t\"aloud\",\n\t\"always\",\n\t\"amazing\",\n\t\"anxious\",\n\t\"anywhere\",\n\t\"apart\",\n\t\"around\",\n\t\"arrogant\",\n\t\"aside\",\n\t\"asleep\",\n\t\"awkward\",\n\t\"back\",\n\t\"bashful\",\n\t\"beautiful\",\n\t\"before\",\n\t\"behind\",\n\t\"below\",\n\t\"beside\",\n\t\"besides\",\n\t\"beyond\",\n\t\"bitter\",\n\t\"bleak\",\n\t\"blissful\",\n\t\"boldly\",\n\t\"bravely\",\n\t\"briefly\",\n\t\"brightly\",\n\t\"brisk\",\n\t\"busily\",\n\t\"calmly\",\n\t\"carefully\",\n\t\"careless\",\n\t\"cautious\",\n\t\"certain\",\n\t\"cheerful\",\n\t\"clearly\",\n\t\"clever\",\n\t\"closely\",\n\t\"closer\",\n\t\"colorful\",\n\t\"common\",\n\t\"correct\",\n\t\"cross\",\n\t\"cruel\",\n\t\"curious\",\n\t\"daily\",\n\t\"dainty\",\n\t\"daring\",\n\t\"dear\",\n\t\"desperate\",\n\t\"diligent\",\n\t\"doubtful\",\n\t\"doubtless\",\n\t\"down\",\n\t\"downwards\",\n\t\"dreamily\",\n\t\"eager\",\n\t\"easily\",\n\t\"either\",\n\t\"elegantly\",\n\t\"else\",\n\t\"elsewhere\",\n\t\"enormous\",\n\t\"enough\",\n\t\"ever\",\n\t\"famous\",\n\t\"far\",\n\t\"fast\",\n\t\"fervent\",\n\t\"fierce\",\n\t\"fondly\",\n\t\"foolish\",\n\t\"forever\",\n\t\"forth\",\n\t\"fortunate\",\n\t\"forward\",\n\t\"frank\",\n\t\"freely\",\n\t\"frequent\",\n\t\"fully\",\n\t\"general\",\n\t\"generous\",\n\t\"gladly\",\n\t\"graceful\",\n\t\"grateful\",\n\t\"gratis\",\n\t\"half\",\n\t\"happily\",\n\t\"hard\",\n\t\"harsh\",\n\t\"hearty\",\n\t\"helpless\",\n\t\"here\",\n\t\"highly\",\n\t\"hitherto\",\n\t\"how\",\n\t\"however\",\n\t\"hurried\",\n\t\"immediate\",\n\t\"in\",\n\t\"indeed\",\n\t\"inland\",\n\t\"innocent\",\n\t\"inside\",\n\t\"instant\",\n\t\"intense\",\n\t\"inward\",\n\t\"jealous\",\n\t\"jovial\",\n\t\"joyful\",\n\t\"jubilant\",\n\t\"keenly\",\n\t\"kindly\",\n\t\"knowing\",\n\t\"lately\",\n\t\"lazily\",\n\t\"lightly\",\n\t\"likely\",\n\t\"little\",\n\t\"live\",\n\t\"loftily\",\n\t\"longing\",\n\t\"loosely\",\n\t\"loudly\",\n\t\"loving\",\n\t\"loyal\",\n\t\"luckily\",\n\t\"madly\",\n\t\"maybe\",\n\t\"meanwhile\",\n\t\"mocking\",\n\t\"monthly\",\n\t\"moreover\",\n\t\"much\",\n\t\"near\",\n\t\"neatly\",\n\t\"neither\",\n\t\"nervous\",\n\t\"never\",\n\t\"noisily\",\n\t\"normal\",\n\t\"not\",\n\t\"now\",\n\t\"nowadays\",\n\t\"nowhere\",\n\t\"oddly\",\n\t\"off\",\n\t\"official\",\n\t\"often\",\n\t\"on\",\n\t\"once\",\n\t\"open\",\n\t\"openly\",\n\t\"opposite\",\n\t\"otherwise\",\n\t\"out\",\n\t\"outside\",\n\t\"over\",\n\t\"overall\",\n\t\"overhead\",\n\t\"overnight\",\n\t\"overseas\",\n\t\"parallel\",\n\t\"partial\",\n\t\"past\",\n\t\"patiently\",\n\t\"perfect\",\n\t\"perhaps\",\n\t\"physical\",\n\t\"playful\",\n\t\"politely\",\n\t\"potential\",\n\t\"powerful\",\n\t\"presto\",\n\t\"profound\",\n\t\"prompt\",\n\t\"proper\",\n\t\"proudly\",\n\t\"punctual\",\n\t\"quickly\",\n\t\"quizzical\",\n\t\"rare\",\n\t\"ravenous\",\n\t\"ready\",\n\t\"really\",\n\t\"reckless\",\n\t\"regular\",\n\t\"repeated\",\n\t\"restful\",\n\t\"rightful\",\n\t\"rigid\",\n\t\"rude\",\n\t\"sadly\",\n\t\"safely\",\n\t\"scarce\",\n\t\"scary\",\n\t\"searching\",\n\t\"seeming\",\n\t\"seldom\",\n\t\"selfish\",\n\t\"separate\",\n\t\"serious\",\n\t\"shaky\",\n\t\"sheepish\",\n\t\"silent\",\n\t\"sleepy\",\n\t\"smooth\",\n\t\"softly\",\n\t\"solemn\",\n\t\"solidly\",\n\t\"sometimes\",\n\t\"speedy\",\n\t\"stealthy\",\n\t\"stern\",\n\t\"strict\",\n\t\"stubborn\",\n\t\"sudden\",\n\t\"supposed\",\n\t\"sweetly\",\n\t\"swiftly\",\n\t\"tender\",\n\t\"tensely\",\n\t\"thankful\",\n\t\"tight\",\n\t\"too\",\n\t\"twice\",\n\t\"under\",\n\t\"untrue\",\n\t\"uphill\",\n\t\"upward\",\n\t\"vaguely\",\n\t\"vainly\",\n\t\"vastly\",\n\t\"warmly\",\n\t\"wearily\",\n\t\"weekly\",\n\t\"well\",\n\t\"wisely\",\n\t\"within\",\n\t\"wrongly\",\n\t\"yonder\",\n];\n\nexport const verbs = [\n\t\"absorb\",\n\t\"accept\",\n\t\"achieve\",\n\t\"adapt\",\n\t\"adore\",\n\t\"advise\",\n\t\"affirm\",\n\t\"agree\",\n\t\"aid\",\n\t\"aim\",\n\t\"amaze\",\n\t\"amuse\",\n\t\"animate\",\n\t\"approve\",\n\t\"arise\",\n\t\"arrive\",\n\t\"ascend\",\n\t\"ask\",\n\t\"aspire\",\n\t\"assure\",\n\t\"attend\",\n\t\"bake\",\n\t\"bask\",\n\t\"beam\",\n\t\"believe\",\n\t\"belong\",\n\t\"bend\",\n\t\"blend\",\n\t\"bless\",\n\t\"blink\",\n\t\"bloom\",\n\t\"boil\",\n\t\"boost\",\n\t\"borrow\",\n\t\"breathe\",\n\t\"bubble\",\n\t\"build\",\n\t\"bump\",\n\t\"burn\",\n\t\"buy\",\n\t\"buzz\",\n\t\"care\",\n\t\"catch\",\n\t\"charm\",\n\t\"cheer\",\n\t\"cherish\",\n\t\"chop\",\n\t\"clap\",\n\t\"clasp\",\n\t\"climb\",\n\t\"clip\",\n\t\"coax\",\n\t\"comfort\",\n\t\"commend\",\n\t\"compose\",\n\t\"conquer\",\n\t\"cook\",\n\t\"create\",\n\t\"cry\",\n\t\"cuddle\",\n\t\"cure\",\n\t\"cut\",\n\t\"dance\",\n\t\"dare\",\n\t\"dart\",\n\t\"dash\",\n\t\"dazzle\",\n\t\"delight\",\n\t\"devour\",\n\t\"dial\",\n\t\"dig\",\n\t\"dine\",\n\t\"dream\",\n\t\"drip\",\n\t\"drop\",\n\t\"drum\",\n\t\"dust\",\n\t\"earn\",\n\t\"edit\",\n\t\"embrace\",\n\t\"emerge\",\n\t\"empower\",\n\t\"enchant\",\n\t\"endure\",\n\t\"engage\",\n\t\"enjoy\",\n\t\"enrich\",\n\t\"evoke\",\n\t\"exhale\",\n\t\"expand\",\n\t\"explore\",\n\t\"express\",\n\t\"fade\",\n\t\"fall\",\n\t\"favor\",\n\t\"fear\",\n\t\"feast\",\n\t\"feel\",\n\t\"fetch\",\n\t\"file\",\n\t\"find\",\n\t\"flip\",\n\t\"flop\",\n\t\"flow\",\n\t\"fold\",\n\t\"fond\",\n\t\"forgive\",\n\t\"foster\",\n\t\"fry\",\n\t\"fulfill\",\n\t\"gasp\",\n\t\"gaze\",\n\t\"gleam\",\n\t\"glow\",\n\t\"grace\",\n\t\"grasp\",\n\t\"greet\",\n\t\"grin\",\n\t\"grip\",\n\t\"grow\",\n\t\"gulp\",\n\t\"hack\",\n\t\"harbor\",\n\t\"heal\",\n\t\"heart\",\n\t\"hike\",\n\t\"hint\",\n\t\"honor\",\n\t\"hope\",\n\t\"hug\",\n\t\"hunt\",\n\t\"hurl\",\n\t\"hush\",\n\t\"imagine\",\n\t\"inspire\",\n\t\"intend\",\n\t\"jest\",\n\t\"jolt\",\n\t\"jump\",\n\t\"kick\",\n\t\"kiss\",\n\t\"laugh\",\n\t\"launch\",\n\t\"lead\",\n\t\"leap\",\n\t\"learn\",\n\t\"lend\",\n\t\"lift\",\n\t\"link\",\n\t\"list\",\n\t\"lock\",\n\t\"loop\",\n\t\"love\",\n\t\"mend\",\n\t\"mix\",\n\t\"mop\",\n\t\"nail\",\n\t\"nourish\",\n\t\"nudge\",\n\t\"nurture\",\n\t\"offer\",\n\t\"pat\",\n\t\"pause\",\n\t\"pave\",\n\t\"peek\",\n\t\"peel\",\n\t\"persist\",\n\t\"pet\",\n\t\"pick\",\n\t\"pinch\",\n\t\"play\",\n\t\"pop\",\n\t\"pout\",\n\t\"praise\",\n\t\"pray\",\n\t\"pride\",\n\t\"promise\",\n\t\"propel\",\n\t\"prosper\",\n\t\"pull\",\n\t\"push\",\n\t\"quell\",\n\t\"quiz\",\n\t\"race\",\n\t\"radiate\",\n\t\"read\",\n\t\"reap\",\n\t\"relish\",\n\t\"renew\",\n\t\"reside\",\n\t\"rest\",\n\t\"revive\",\n\t\"ripple\",\n\t\"rise\",\n\t\"roam\",\n\t\"roar\",\n\t\"rush\",\n\t\"sail\",\n\t\"savor\",\n\t\"scold\",\n\t\"scoop\",\n\t\"seek\",\n\t\"sew\",\n\t\"shine\",\n\t\"sing\",\n\t\"skip\",\n\t\"slide\",\n\t\"slurp\",\n\t\"smile\",\n\t\"snap\",\n\t\"snip\",\n\t\"soar\",\n\t\"spark\",\n\t\"spin\",\n\t\"splash\",\n\t\"sprout\",\n\t\"spur\",\n\t\"stab\",\n\t\"startle\",\n\t\"stir\",\n\t\"stop\",\n\t\"strive\",\n\t\"succeed\",\n\t\"support\",\n\t\"surge\",\n\t\"sway\",\n\t\"swim\",\n\t\"talk\",\n\t\"tap\",\n\t\"taste\",\n\t\"tear\",\n\t\"tend\",\n\t\"thrive\",\n\t\"tickle\",\n\t\"transform\",\n\t\"treasure\",\n\t\"treat\",\n\t\"trim\",\n\t\"trip\",\n\t\"trust\",\n\t\"twirl\",\n\t\"twist\",\n\t\"type\",\n\t\"urge\",\n\t\"value\",\n\t\"vent\",\n\t\"view\",\n\t\"walk\",\n\t\"wave\",\n\t\"win\",\n\t\"wish\",\n\t\"work\",\n\t\"yell\",\n\t\"zap\",\n\t\"zip\",\n\t\"zoom\",\n];\n"]}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0396a296-9686-503d-9197-353bc24140ad")}catch(e){}}();
|
|
3
1
|
import { describe, it, expect } from "vitest";
|
|
4
2
|
import { adjectives, animals, adverbs, verbs } from "./words.js";
|
|
5
3
|
const wordlists = [adjectives, animals, adverbs, verbs];
|
|
@@ -25,5 +23,4 @@ describe("wordlists", () => {
|
|
|
25
23
|
}
|
|
26
24
|
});
|
|
27
25
|
});
|
|
28
|
-
//# sourceMappingURL=words.test.js.map
|
|
29
|
-
//# debugId=0396a296-9686-503d-9197-353bc24140ad
|
|
26
|
+
//# sourceMappingURL=words.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"words.test.js","
|
|
1
|
+
{"version":3,"file":"words.test.js","sourceRoot":"/","sources":["human-id/words.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,SAAS,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACxD,MAAM,QAAQ,GAAG,CAAC,GAAG,UAAU,EAAE,GAAG,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,KAAK,CAAC,CAAC;AAEnE,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;QAChC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YAClC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnC,CAAC;IACF,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC9C,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;QACjC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC5C,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QACtC,CAAC;IACF,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACxC,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { describe, it, expect } from \"vitest\";\nimport { adjectives, animals, adverbs, verbs } from \"./words.js\";\n\nconst wordlists = [adjectives, animals, adverbs, verbs];\nconst allwords = [...adjectives, ...animals, ...adverbs, ...verbs];\n\ndescribe(\"wordlists\", () => {\n\tit(\"should have 256 words\", () => {\n\t\tfor (const wordlist of wordlists) {\n\t\t\texpect(wordlist.length).toBe(256);\n\t\t}\n\t});\n\tit(\"words should be unique across lists\", () => {\n\t\tconst unique = new Set(allwords);\n\t\texpect(unique.size).toBe(256 * 4);\n\t});\n\tit(\"words should have < 10 characters\", () => {\n\t\tfor (const word of allwords) {\n\t\t\texpect(word.length).toBeLessThan(10);\n\t\t}\n\t});\n\tit(\"words should match /^[a-z]+$/\", () => {\n\t\tfor (const word of allwords) {\n\t\t\texpect(word.match(/^[a-z]+$/) !== null).toBe(true);\n\t\t}\n\t});\n});\n"]}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="bec77b74-fbb4-5eda-87d6-1c11e4009eec")}catch(e){}}();
|
|
3
1
|
import { PluginDoesNotImplementFunctionError, PluginMissingError, } from "../plugin/errors.js";
|
|
4
2
|
export async function exportFiles(opts) {
|
|
5
3
|
const plugin = opts.plugins.find((p) => p.key === opts.pluginKey);
|
|
@@ -22,5 +20,4 @@ export async function exportFiles(opts) {
|
|
|
22
20
|
});
|
|
23
21
|
return files;
|
|
24
22
|
}
|
|
25
|
-
//# sourceMappingURL=exportFiles.js.map
|
|
26
|
-
//# debugId=bec77b74-fbb4-5eda-87d6-1c11e4009eec
|
|
23
|
+
//# sourceMappingURL=exportFiles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exportFiles.js","sources":["import-export/exportFiles.ts"],"
|
|
1
|
+
{"version":3,"file":"exportFiles.js","sourceRoot":"/","sources":["import-export/exportFiles.ts"],"names":[],"mappings":"AACA,OAAO,EACN,mCAAmC,EACnC,kBAAkB,GAClB,MAAM,qBAAqB,CAAC;AAK7B,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAKjC;IACA,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC;IAClE,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,kBAAkB,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IACtE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QACzB,MAAM,IAAI,mCAAmC,CAAC;YAC7C,MAAM,EAAE,IAAI,CAAC,SAAS;YACtB,QAAQ,EAAE,aAAa;SACvB,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC;IACzE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC;IAC3E,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC;IAE3E,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC;QACtC,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC;QACxC,OAAO;QACP,QAAQ;QACR,QAAQ;KACR,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACd,CAAC","sourcesContent":["import type { Kysely } from \"kysely\";\nimport {\n\tPluginDoesNotImplementFunctionError,\n\tPluginMissingError,\n} from \"../plugin/errors.js\";\nimport type { ProjectSettings } from \"../json-schema/settings.js\";\nimport type { InlangDatabaseSchema } from \"../database/schema.js\";\nimport type { InlangPlugin } from \"../plugin/schema.js\";\n\nexport async function exportFiles(opts: {\n\treadonly pluginKey: string;\n\treadonly settings: ProjectSettings;\n\treadonly plugins: readonly InlangPlugin[];\n\treadonly db: Kysely<InlangDatabaseSchema>;\n}) {\n\tconst plugin = opts.plugins.find((p) => p.key === opts.pluginKey);\n\tif (!plugin) throw new PluginMissingError({ plugin: opts.pluginKey });\n\tif (!plugin.exportFiles) {\n\t\tthrow new PluginDoesNotImplementFunctionError({\n\t\t\tplugin: opts.pluginKey,\n\t\t\tfunction: \"exportFiles\",\n\t\t});\n\t}\n\n\tconst bundles = await opts.db.selectFrom(\"bundle\").selectAll().execute();\n\tconst messages = await opts.db.selectFrom(\"message\").selectAll().execute();\n\tconst variants = await opts.db.selectFrom(\"variant\").selectAll().execute();\n\n\tconst files = await plugin.exportFiles({\n\t\tsettings: structuredClone(opts.settings),\n\t\tbundles,\n\t\tmessages,\n\t\tvariants,\n\t});\n\treturn files;\n}\n"]}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0180f00c-8bb4-50a0-a603-1c8f0e7bdcd8")}catch(e){}}();
|
|
3
1
|
import { PluginDoesNotImplementFunctionError, PluginMissingError, } from "../plugin/errors.js";
|
|
4
2
|
export async function importFiles(args) {
|
|
5
3
|
const plugin = args.plugins.find((p) => p.key === args.pluginKey);
|
|
@@ -120,5 +118,4 @@ export async function importFiles(args) {
|
|
|
120
118
|
}
|
|
121
119
|
});
|
|
122
120
|
}
|
|
123
|
-
//# sourceMappingURL=importFiles.js.map
|
|
124
|
-
//# debugId=0180f00c-8bb4-50a0-a603-1c8f0e7bdcd8
|
|
121
|
+
//# sourceMappingURL=importFiles.js.map
|