@growi/core 2.4.0 → 2.5.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/consts/index.d.ts +5 -5
- package/dist/index.d.ts +2 -2
- package/dist/interfaces/attachment.d.ts +4 -4
- package/dist/interfaces/common.cjs.map +1 -1
- package/dist/interfaces/common.js.map +1 -1
- package/dist/interfaces/external-account.d.ts +2 -2
- package/dist/interfaces/growi-app-info.cjs.map +1 -1
- package/dist/interfaces/growi-app-info.d.ts +1 -1
- package/dist/interfaces/growi-app-info.js.map +1 -1
- package/dist/interfaces/growi-theme-metadata.cjs.map +1 -1
- package/dist/interfaces/growi-theme-metadata.js.map +1 -1
- package/dist/interfaces/index.d.ts +20 -20
- package/dist/interfaces/page.cjs.map +1 -1
- package/dist/interfaces/page.d.ts +6 -6
- package/dist/interfaces/page.js.map +1 -1
- package/dist/interfaces/primitive/string.cjs.map +1 -1
- package/dist/interfaces/primitive/string.js.map +1 -1
- package/dist/interfaces/revision.cjs.map +1 -1
- package/dist/interfaces/revision.d.ts +4 -4
- package/dist/interfaces/revision.js.map +1 -1
- package/dist/interfaces/scope.cjs +1 -1
- package/dist/interfaces/scope.cjs.map +1 -1
- package/dist/interfaces/scope.d.ts +8 -8
- package/dist/interfaces/scope.js +6 -6
- package/dist/interfaces/scope.js.map +1 -1
- package/dist/interfaces/server/access-token-parser.d.ts +3 -3
- package/dist/interfaces/server/index.d.ts +1 -1
- package/dist/interfaces/subscription.cjs.map +1 -1
- package/dist/interfaces/subscription.d.ts +3 -3
- package/dist/interfaces/subscription.js.map +1 -1
- package/dist/interfaces/user.cjs.map +1 -1
- package/dist/interfaces/user.d.ts +4 -4
- package/dist/interfaces/user.js.map +1 -1
- package/dist/interfaces/vault/index.cjs +2 -0
- package/dist/interfaces/vault/index.cjs.map +1 -0
- package/dist/interfaces/vault/index.d.ts +3 -0
- package/dist/interfaces/vault/index.js +2 -0
- package/dist/interfaces/vault/index.js.map +1 -0
- package/dist/interfaces/vault/vault-compose-view.cjs +2 -0
- package/dist/interfaces/vault/vault-compose-view.cjs.map +1 -0
- package/dist/interfaces/vault/vault-compose-view.d.ts +11 -0
- package/dist/interfaces/vault/vault-compose-view.js +2 -0
- package/dist/interfaces/vault/vault-compose-view.js.map +1 -0
- package/dist/interfaces/vault/vault-instruction.cjs +2 -0
- package/dist/interfaces/vault/vault-instruction.cjs.map +1 -0
- package/dist/interfaces/vault/vault-instruction.d.ts +35 -0
- package/dist/interfaces/vault/vault-instruction.js +2 -0
- package/dist/interfaces/vault/vault-instruction.js.map +1 -0
- package/dist/interfaces/vault/vault-storage-stats.cjs +2 -0
- package/dist/interfaces/vault/vault-storage-stats.cjs.map +1 -0
- package/dist/interfaces/vault/vault-storage-stats.d.ts +11 -0
- package/dist/interfaces/vault/vault-storage-stats.js +2 -0
- package/dist/interfaces/vault/vault-storage-stats.js.map +1 -0
- package/dist/models/devided-page-path.cjs.map +1 -1
- package/dist/models/devided-page-path.js.map +1 -1
- package/dist/models/index.d.ts +2 -2
- package/dist/models/serializers/attachment-serializer.cjs.map +1 -1
- package/dist/models/serializers/attachment-serializer.d.ts +2 -2
- package/dist/models/serializers/attachment-serializer.js.map +1 -1
- package/dist/models/serializers/index.d.ts +2 -2
- package/dist/models/serializers/user-serializer.cjs.map +1 -1
- package/dist/models/serializers/user-serializer.d.ts +2 -2
- package/dist/models/serializers/user-serializer.js.map +1 -1
- package/dist/models/vo/error-apiv3.cjs.map +1 -1
- package/dist/models/vo/error-apiv3.js.map +1 -1
- package/dist/remark-plugins/index.d.ts +2 -2
- package/dist/remark-plugins/util/option-parser.cjs.map +1 -1
- package/dist/remark-plugins/util/option-parser.d.ts +1 -1
- package/dist/remark-plugins/util/option-parser.js.map +1 -1
- package/dist/swr/index.d.ts +1 -1
- package/dist/swr/with-utils.cjs.map +1 -1
- package/dist/swr/with-utils.js.map +1 -1
- package/dist/utils/browser-utils.cjs.map +1 -1
- package/dist/utils/browser-utils.js.map +1 -1
- package/dist/utils/env-utils.cjs.map +1 -1
- package/dist/utils/env-utils.js.map +1 -1
- package/dist/utils/escape-string-for-regex.cjs.map +1 -1
- package/dist/utils/escape-string-for-regex.js.map +1 -1
- package/dist/utils/global-event-target.cjs.map +1 -1
- package/dist/utils/global-event-target.js.map +1 -1
- package/dist/utils/growi-theme-metadata.cjs.map +1 -1
- package/dist/utils/growi-theme-metadata.d.ts +2 -2
- package/dist/utils/growi-theme-metadata.js.map +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +11 -11
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/is-deep-equals.cjs.map +1 -1
- package/dist/utils/is-deep-equals.js.map +1 -1
- package/dist/utils/page-path-utils/generate-children-regexp.cjs.map +1 -1
- package/dist/utils/page-path-utils/generate-children-regexp.js.map +1 -1
- package/dist/utils/page-path-utils/index.cjs.map +1 -1
- package/dist/utils/page-path-utils/index.d.ts +2 -2
- package/dist/utils/page-path-utils/index.js.map +1 -1
- package/dist/utils/page-path-utils/is-top-page.cjs.map +1 -1
- package/dist/utils/page-path-utils/is-top-page.js.map +1 -1
- package/dist/utils/page-utils.cjs.map +1 -1
- package/dist/utils/page-utils.d.ts +1 -1
- package/dist/utils/page-utils.js.map +1 -1
- package/dist/utils/path-utils.cjs.map +1 -1
- package/dist/utils/path-utils.js.map +1 -1
- package/dist/utils/template-checker.cjs.map +1 -1
- package/dist/utils/template-checker.js.map +1 -1
- package/package.json +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.js","sources":["../../src/interfaces/scope.ts"],"sourcesContent":["// SCOPE_SEED defines the basic scope structure.\n// When you need to set different permissions for Admin and User\n// on specific endpoints (like /me), use SCOPE rather than modifying SCOPE_SEED.\n\n// If you want to add a new scope:\n// 1. Add a new key to the SCOPE_SEED object below\n// 2. Add the corresponding scope strings to the Scope type union at the bottom of this file\n// 3. Change translation file contents (accesstoken_scopes_desc) when scope structure is modified\n\nconst SCOPE_SEED_ADMIN = {\n admin: {\n top: {},\n app: {},\n security: {},\n markdown: {},\n customize: {},\n import_data: {},\n export_data: {},\n data_transfer: {},\n external_notification: {},\n slack_integration: {},\n legacy_slack_integration: {},\n user_management: {},\n user_group_management: {},\n audit_log: {},\n plugin: {},\n
|
|
1
|
+
{"version":3,"file":"scope.js","sources":["../../src/interfaces/scope.ts"],"sourcesContent":["// SCOPE_SEED defines the basic scope structure.\n// When you need to set different permissions for Admin and User\n// on specific endpoints (like /me), use SCOPE rather than modifying SCOPE_SEED.\n\n// If you want to add a new scope:\n// 1. Add a new key to the SCOPE_SEED object below\n// 2. Add the corresponding scope strings to the Scope type union at the bottom of this file\n// 3. Change translation file contents (accesstoken_scopes_desc) when scope structure is modified\n\nconst SCOPE_SEED_ADMIN = {\n admin: {\n top: {},\n app: {},\n ai: {},\n security: {},\n markdown: {},\n customize: {},\n import_data: {},\n export_data: {},\n data_transfer: {},\n external_notification: {},\n slack_integration: {},\n legacy_slack_integration: {},\n user_management: {},\n user_group_management: {},\n audit_log: {},\n plugin: {},\n full_text_search: {},\n },\n} as const;\n\nconst SCOPE_SEED_USER = {\n user_settings: {\n info: {},\n external_account: {},\n password: {},\n api: {\n api_token: {},\n access_token: {},\n },\n in_app_notification: {},\n other: {},\n },\n features: {\n ai: {},\n page: {},\n share_link: {},\n bookmark: {},\n attachment: {},\n page_bulk_export: {},\n in_app_notification: {},\n user: {},\n user_group: {},\n },\n} as const;\n\nconst SCOPE_SEED = {\n ...SCOPE_SEED_ADMIN,\n ...SCOPE_SEED_USER,\n} as const;\n\nexport const ACTION = {\n READ: 'read',\n WRITE: 'write',\n} as const;\n\ntype ACTION_TYPE = (typeof ACTION)[keyof typeof ACTION];\nexport const ALL_SIGN = '*';\n\nconst SCOPE_SEED_WITH_ACTION = Object.values(ACTION).reduce(\n (acc, action) => {\n acc[action] = SCOPE_SEED;\n return acc;\n },\n {} as Record<ACTION_TYPE, typeof SCOPE_SEED>,\n);\n\n// ============================================================================\n// SCOPE LITERAL TYPE\n// ============================================================================\n// This type is explicitly defined to avoid TS2589 \"Type instantiation is\n// excessively deep\" errors that occur with recursive type definitions.\n//\n// IMPORTANT: When modifying SCOPE_SEED above, update this type union accordingly.\n// The scope strings follow the pattern: {action}:{category}[:{subcategory}[:{item}]]\n// Wildcard scopes use '*' at any level: {action}:{category}:*\n// ============================================================================\n\n// Read scopes - Admin\ntype ReadAdminScope =\n | 'read:admin:top'\n | 'read:admin:app'\n | 'read:admin:ai'\n | 'read:admin:security'\n | 'read:admin:markdown'\n | 'read:admin:customize'\n | 'read:admin:import_data'\n | 'read:admin:export_data'\n | 'read:admin:data_transfer'\n | 'read:admin:external_notification'\n | 'read:admin:slack_integration'\n | 'read:admin:legacy_slack_integration'\n | 'read:admin:user_management'\n | 'read:admin:user_group_management'\n | 'read:admin:audit_log'\n | 'read:admin:plugin'\n | 'read:admin:full_text_search'\n | 'read:admin:*';\n\n// Read scopes - User Settings\ntype ReadUserSettingsScope =\n | 'read:user_settings:info'\n | 'read:user_settings:external_account'\n | 'read:user_settings:password'\n | 'read:user_settings:api:api_token'\n | 'read:user_settings:api:access_token'\n | 'read:user_settings:api:*'\n | 'read:user_settings:in_app_notification'\n | 'read:user_settings:other'\n | 'read:user_settings:*';\n\n// Read scopes - Features\ntype ReadFeaturesScope =\n | 'read:features:ai'\n | 'read:features:page'\n | 'read:features:share_link'\n | 'read:features:bookmark'\n | 'read:features:attachment'\n | 'read:features:page_bulk_export'\n | 'read:features:in_app_notification'\n | 'read:features:user'\n | 'read:features:user_group'\n | 'read:features:*';\n\n// Write scopes - Admin\ntype WriteAdminScope =\n | 'write:admin:top'\n | 'write:admin:app'\n | 'write:admin:ai'\n | 'write:admin:security'\n | 'write:admin:markdown'\n | 'write:admin:customize'\n | 'write:admin:import_data'\n | 'write:admin:export_data'\n | 'write:admin:data_transfer'\n | 'write:admin:external_notification'\n | 'write:admin:slack_integration'\n | 'write:admin:legacy_slack_integration'\n | 'write:admin:user_management'\n | 'write:admin:user_group_management'\n | 'write:admin:audit_log'\n | 'write:admin:plugin'\n | 'write:admin:full_text_search'\n | 'write:admin:*';\n\n// Write scopes - User Settings\ntype WriteUserSettingsScope =\n | 'write:user_settings:info'\n | 'write:user_settings:external_account'\n | 'write:user_settings:password'\n | 'write:user_settings:api:api_token'\n | 'write:user_settings:api:access_token'\n | 'write:user_settings:api:*'\n | 'write:user_settings:in_app_notification'\n | 'write:user_settings:other'\n | 'write:user_settings:*';\n\n// Write scopes - Features\ntype WriteFeaturesScope =\n | 'write:features:ai'\n | 'write:features:page'\n | 'write:features:share_link'\n | 'write:features:bookmark'\n | 'write:features:attachment'\n | 'write:features:page_bulk_export'\n | 'write:features:in_app_notification'\n | 'write:features:user'\n | 'write:features:user_group'\n | 'write:features:*';\n\n// Combined Scope type - all valid scope strings\nexport type Scope =\n | ReadAdminScope\n | ReadUserSettingsScope\n | ReadFeaturesScope\n | WriteAdminScope\n | WriteUserSettingsScope\n | WriteFeaturesScope\n | 'read:*'\n | 'write:*';\n\n// ScopeConstants type definition\ntype ScopeConstantLeaf = Scope;\n\ntype ScopeConstantNode<T> = {\n [K in keyof T as Uppercase<string & K>]: T[K] extends object\n ? keyof T[K] extends never\n ? ScopeConstantLeaf\n : ScopeConstantNode<T[K]> & { ALL: Scope }\n : ScopeConstantLeaf;\n};\n\ntype ScopeConstantType = {\n [A in keyof typeof SCOPE_SEED_WITH_ACTION as Uppercase<\n string & A\n >]: ScopeConstantNode<typeof SCOPE_SEED> & { ALL: Scope };\n};\n\nconst buildScopeConstants = (): ScopeConstantType => {\n const result = {} as Partial<ScopeConstantType>;\n\n const processObject = (\n // biome-ignore lint/suspicious/noExplicitAny: ignore\n obj: Record<string, any>,\n path: string[] = [],\n // biome-ignore lint/suspicious/noExplicitAny: ignore\n resultObj: Record<string, any>,\n ) => {\n for (const [key, value] of Object.entries(obj)) {\n const upperKey = key.toUpperCase();\n const currentPath = [...path, key];\n const scopePath = currentPath.join(':');\n\n if (value == null) {\n continue; // Changed from 'return' to 'continue' to match the loop behavior\n }\n\n if (typeof value === 'object' && Object.keys(value).length === 0) {\n resultObj[upperKey] = `${scopePath}` as Scope;\n } else if (typeof value === 'object') {\n resultObj[upperKey] = {\n ALL: `${scopePath}:${ALL_SIGN}` as Scope,\n };\n\n processObject(value, currentPath, resultObj[upperKey]);\n }\n }\n };\n processObject(SCOPE_SEED_WITH_ACTION, [], result);\n\n return result as ScopeConstantType;\n};\n\nexport const SCOPE = buildScopeConstants();\n"],"names":["SCOPE_SEED_ADMIN","SCOPE_SEED_USER","SCOPE_SEED","ACTION","ALL_SIGN","SCOPE_SEED_WITH_ACTION","acc","action","buildScopeConstants","result","processObject","obj","path","resultObj","key","value","upperKey","currentPath","scopePath","SCOPE"],"mappings":"AASA,MAAMA,IAAmB;AAAA,EACvB,OAAO;AAAA,IACL,KAAK,CAAA;AAAA,IACL,KAAK,CAAA;AAAA,IACL,IAAI,CAAA;AAAA,IACJ,UAAU,CAAA;AAAA,IACV,UAAU,CAAA;AAAA,IACV,WAAW,CAAA;AAAA,IACX,aAAa,CAAA;AAAA,IACb,aAAa,CAAA;AAAA,IACb,eAAe,CAAA;AAAA,IACf,uBAAuB,CAAA;AAAA,IACvB,mBAAmB,CAAA;AAAA,IACnB,0BAA0B,CAAA;AAAA,IAC1B,iBAAiB,CAAA;AAAA,IACjB,uBAAuB,CAAA;AAAA,IACvB,WAAW,CAAA;AAAA,IACX,QAAQ,CAAA;AAAA,IACR,kBAAkB,CAAA;AAAA,EAAC;AAEvB,GAEMC,IAAkB;AAAA,EACtB,eAAe;AAAA,IACb,MAAM,CAAA;AAAA,IACN,kBAAkB,CAAA;AAAA,IAClB,UAAU,CAAA;AAAA,IACV,KAAK;AAAA,MACH,WAAW,CAAA;AAAA,MACX,cAAc,CAAA;AAAA,IAAC;AAAA,IAEjB,qBAAqB,CAAA;AAAA,IACrB,OAAO,CAAA;AAAA,EAAC;AAAA,EAEV,UAAU;AAAA,IACR,IAAI,CAAA;AAAA,IACJ,MAAM,CAAA;AAAA,IACN,YAAY,CAAA;AAAA,IACZ,UAAU,CAAA;AAAA,IACV,YAAY,CAAA;AAAA,IACZ,kBAAkB,CAAA;AAAA,IAClB,qBAAqB,CAAA;AAAA,IACrB,MAAM,CAAA;AAAA,IACN,YAAY,CAAA;AAAA,EAAC;AAEjB,GAEMC,IAAa;AAAA,EACjB,GAAGF;AAAA,EACH,GAAGC;AACL,GAEaE,IAAS;AAAA,EACpB,MAAM;AAAA,EACN,OAAO;AACT,GAGaC,IAAW,KAElBC,IAAyB,OAAO,OAAOF,CAAM,EAAE;AAAA,EACnD,CAACG,GAAKC,OACJD,EAAIC,CAAM,IAAIL,GACPI;AAAA,EAET,CAAA;AACF,GAqIME,IAAsB,MAAyB;AACnD,QAAMC,IAAS,CAAA,GAETC,IAAgB,CAEpBC,GACAC,IAAiB,CAAA,GAEjBC,MACG;AACH,eAAW,CAACC,GAAKC,CAAK,KAAK,OAAO,QAAQJ,CAAG,GAAG;AAC9C,YAAMK,IAAWF,EAAI,YAAA,GACfG,IAAc,CAAC,GAAGL,GAAME,CAAG,GAC3BI,IAAYD,EAAY,KAAK,GAAG;AAEtC,MAAIF,KAAS,SAIT,OAAOA,KAAU,YAAY,OAAO,KAAKA,CAAK,EAAE,WAAW,IAC7DF,EAAUG,CAAQ,IAAI,GAAGE,CAAS,KACzB,OAAOH,KAAU,aAC1BF,EAAUG,CAAQ,IAAI;AAAA,QACpB,KAAK,GAAGE,CAAS,IAAId,CAAQ;AAAA,MAAA,GAG/BM,EAAcK,GAAOE,GAAaJ,EAAUG,CAAQ,CAAC;AAAA,IAEzD;AAAA,EACF;AACA,SAAAN,EAAcL,GAAwB,CAAA,GAAII,CAAM,GAEzCA;AACT,GAEaU,IAAQX,EAAA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Request, RequestHandler } from 'express';
|
|
2
|
-
import { IUserSerializedSecurely } from '../../models/serializers';
|
|
3
|
-
import { Scope } from '../scope';
|
|
4
|
-
import { IUserHasId } from '../user';
|
|
2
|
+
import { IUserSerializedSecurely } from '../../models/serializers/index.js';
|
|
3
|
+
import { Scope } from '../scope.js';
|
|
4
|
+
import { IUserHasId } from '../user.js';
|
|
5
5
|
export interface AccessTokenParserReq extends Request {
|
|
6
6
|
user?: IUserSerializedSecurely<IUserHasId>;
|
|
7
7
|
query: Request['query'] & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './access-token-parser';
|
|
1
|
+
export * from './access-token-parser.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.cjs","sources":["../../src/interfaces/subscription.ts"],"sourcesContent":["import type { Ref } from './common';\nimport type { IPage } from './page';\nimport type { IUser } from './user';\n\nexport const SubscriptionStatusType = {\n SUBSCRIBE: 'SUBSCRIBE',\n UNSUBSCRIBE: 'UNSUBSCRIBE',\n} as const;\nexport const AllSubscriptionStatusType = Object.values(SubscriptionStatusType);\nexport type SubscriptionStatusType =\n (typeof SubscriptionStatusType)[keyof typeof SubscriptionStatusType];\n\nexport interface ISubscription {\n user: Ref<IUser>;\n targetModel: string;\n target: Ref<IPage>;\n status: string;\n createdAt: Date;\n\n isSubscribing(): boolean;\n isUnsubscribing(): boolean;\n}\n"],"names":["SubscriptionStatusType","AllSubscriptionStatusType"],"mappings":"gFAIO,MAAMA,EAAyB,CACpC,UAAW,YACX,YAAa,aACf,EACaC,EAA4B,OAAO,OAAOD,CAAsB"}
|
|
1
|
+
{"version":3,"file":"subscription.cjs","sources":["../../src/interfaces/subscription.ts"],"sourcesContent":["import type { Ref } from './common.js';\nimport type { IPage } from './page.js';\nimport type { IUser } from './user.js';\n\nexport const SubscriptionStatusType = {\n SUBSCRIBE: 'SUBSCRIBE',\n UNSUBSCRIBE: 'UNSUBSCRIBE',\n} as const;\nexport const AllSubscriptionStatusType = Object.values(SubscriptionStatusType);\nexport type SubscriptionStatusType =\n (typeof SubscriptionStatusType)[keyof typeof SubscriptionStatusType];\n\nexport interface ISubscription {\n user: Ref<IUser>;\n targetModel: string;\n target: Ref<IPage>;\n status: string;\n createdAt: Date;\n\n isSubscribing(): boolean;\n isUnsubscribing(): boolean;\n}\n"],"names":["SubscriptionStatusType","AllSubscriptionStatusType"],"mappings":"gFAIO,MAAMA,EAAyB,CACpC,UAAW,YACX,YAAa,aACf,EACaC,EAA4B,OAAO,OAAOD,CAAsB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Ref } from './common';
|
|
2
|
-
import { IPage } from './page';
|
|
3
|
-
import { IUser } from './user';
|
|
1
|
+
import { Ref } from './common.js';
|
|
2
|
+
import { IPage } from './page.js';
|
|
3
|
+
import { IUser } from './user.js';
|
|
4
4
|
export declare const SubscriptionStatusType: {
|
|
5
5
|
readonly SUBSCRIBE: "SUBSCRIBE";
|
|
6
6
|
readonly UNSUBSCRIBE: "UNSUBSCRIBE";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.js","sources":["../../src/interfaces/subscription.ts"],"sourcesContent":["import type { Ref } from './common';\nimport type { IPage } from './page';\nimport type { IUser } from './user';\n\nexport const SubscriptionStatusType = {\n SUBSCRIBE: 'SUBSCRIBE',\n UNSUBSCRIBE: 'UNSUBSCRIBE',\n} as const;\nexport const AllSubscriptionStatusType = Object.values(SubscriptionStatusType);\nexport type SubscriptionStatusType =\n (typeof SubscriptionStatusType)[keyof typeof SubscriptionStatusType];\n\nexport interface ISubscription {\n user: Ref<IUser>;\n targetModel: string;\n target: Ref<IPage>;\n status: string;\n createdAt: Date;\n\n isSubscribing(): boolean;\n isUnsubscribing(): boolean;\n}\n"],"names":["SubscriptionStatusType","AllSubscriptionStatusType"],"mappings":"AAIO,MAAMA,IAAyB;AAAA,EACpC,WAAW;AAAA,EACX,aAAa;AACf,GACaC,IAA4B,OAAO,OAAOD,CAAsB;"}
|
|
1
|
+
{"version":3,"file":"subscription.js","sources":["../../src/interfaces/subscription.ts"],"sourcesContent":["import type { Ref } from './common.js';\nimport type { IPage } from './page.js';\nimport type { IUser } from './user.js';\n\nexport const SubscriptionStatusType = {\n SUBSCRIBE: 'SUBSCRIBE',\n UNSUBSCRIBE: 'UNSUBSCRIBE',\n} as const;\nexport const AllSubscriptionStatusType = Object.values(SubscriptionStatusType);\nexport type SubscriptionStatusType =\n (typeof SubscriptionStatusType)[keyof typeof SubscriptionStatusType];\n\nexport interface ISubscription {\n user: Ref<IUser>;\n targetModel: string;\n target: Ref<IPage>;\n status: string;\n createdAt: Date;\n\n isSubscribing(): boolean;\n isUnsubscribing(): boolean;\n}\n"],"names":["SubscriptionStatusType","AllSubscriptionStatusType"],"mappings":"AAIO,MAAMA,IAAyB;AAAA,EACpC,WAAW;AAAA,EACX,aAAa;AACf,GACaC,IAA4B,OAAO,OAAOD,CAAsB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.cjs","sources":["../../src/interfaces/user.ts"],"sourcesContent":["import type { IAttachment } from './attachment';\nimport type { Ref } from './common';\nimport type { HasObjectId } from './has-object-id';\nimport type { Lang } from './lang';\n\nexport type IUser = {\n name: string;\n username: string;\n email: string;\n password: string;\n image?: string; // for backward conpatibility\n imageAttachment?: Ref<IAttachment>;\n imageUrlCached: string;\n isGravatarEnabled: boolean;\n admin: boolean;\n readOnly: boolean;\n apiToken?: string;\n isEmailPublished: boolean;\n isInvitationEmailSended: boolean;\n lang: Lang;\n slackMemberId?: string;\n createdAt: Date;\n lastLoginAt?: Date;\n contributionsMigratedAt?: Date;\n introduction: string;\n status: IUserStatus;\n};\n\nexport type IUserGroupRelation = {\n relatedGroup: Ref<IUserGroup>;\n relatedUser: Ref<IUser>;\n createdAt: Date;\n};\n\nexport type IUserGroup = {\n name: string;\n createdAt: Date;\n description: string;\n parent: Ref<IUserGroup> | null;\n};\n\nexport const USER_STATUS = {\n REGISTERED: 1,\n ACTIVE: 2,\n SUSPENDED: 3,\n DELETED: 4,\n INVITED: 5,\n} as const;\nexport type IUserStatus = (typeof USER_STATUS)[keyof typeof USER_STATUS];\n\nexport type IUserHasId = IUser & HasObjectId;\nexport type IUserGroupHasId = IUserGroup & HasObjectId;\nexport type IUserGroupRelationHasId = IUserGroupRelation & HasObjectId;\n\nexport type IAdminExternalAccount<P> = {\n _id: string;\n providerType: P;\n accountId: string;\n user: IUser;\n createdAt: Date;\n};\n"],"names":["USER_STATUS"],"mappings":"gFAyCO,MAAMA,EAAc,CACzB,WAAY,EACZ,OAAQ,EACR,UAAW,EACX,QAAS,EACT,QAAS,CACX"}
|
|
1
|
+
{"version":3,"file":"user.cjs","sources":["../../src/interfaces/user.ts"],"sourcesContent":["import type { IAttachment } from './attachment.js';\nimport type { Ref } from './common.js';\nimport type { HasObjectId } from './has-object-id.js';\nimport type { Lang } from './lang.js';\n\nexport type IUser = {\n name: string;\n username: string;\n email: string;\n password: string;\n image?: string; // for backward conpatibility\n imageAttachment?: Ref<IAttachment>;\n imageUrlCached: string;\n isGravatarEnabled: boolean;\n admin: boolean;\n readOnly: boolean;\n apiToken?: string;\n isEmailPublished: boolean;\n isInvitationEmailSended: boolean;\n lang: Lang;\n slackMemberId?: string;\n createdAt: Date;\n lastLoginAt?: Date;\n contributionsMigratedAt?: Date;\n introduction: string;\n status: IUserStatus;\n};\n\nexport type IUserGroupRelation = {\n relatedGroup: Ref<IUserGroup>;\n relatedUser: Ref<IUser>;\n createdAt: Date;\n};\n\nexport type IUserGroup = {\n name: string;\n createdAt: Date;\n description: string;\n parent: Ref<IUserGroup> | null;\n};\n\nexport const USER_STATUS = {\n REGISTERED: 1,\n ACTIVE: 2,\n SUSPENDED: 3,\n DELETED: 4,\n INVITED: 5,\n} as const;\nexport type IUserStatus = (typeof USER_STATUS)[keyof typeof USER_STATUS];\n\nexport type IUserHasId = IUser & HasObjectId;\nexport type IUserGroupHasId = IUserGroup & HasObjectId;\nexport type IUserGroupRelationHasId = IUserGroupRelation & HasObjectId;\n\nexport type IAdminExternalAccount<P> = {\n _id: string;\n providerType: P;\n accountId: string;\n user: IUser;\n createdAt: Date;\n};\n"],"names":["USER_STATUS"],"mappings":"gFAyCO,MAAMA,EAAc,CACzB,WAAY,EACZ,OAAQ,EACR,UAAW,EACX,QAAS,EACT,QAAS,CACX"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IAttachment } from './attachment';
|
|
2
|
-
import { Ref } from './common';
|
|
3
|
-
import { HasObjectId } from './has-object-id';
|
|
4
|
-
import { Lang } from './lang';
|
|
1
|
+
import { IAttachment } from './attachment.js';
|
|
2
|
+
import { Ref } from './common.js';
|
|
3
|
+
import { HasObjectId } from './has-object-id.js';
|
|
4
|
+
import { Lang } from './lang.js';
|
|
5
5
|
export type IUser = {
|
|
6
6
|
name: string;
|
|
7
7
|
username: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.js","sources":["../../src/interfaces/user.ts"],"sourcesContent":["import type { IAttachment } from './attachment';\nimport type { Ref } from './common';\nimport type { HasObjectId } from './has-object-id';\nimport type { Lang } from './lang';\n\nexport type IUser = {\n name: string;\n username: string;\n email: string;\n password: string;\n image?: string; // for backward conpatibility\n imageAttachment?: Ref<IAttachment>;\n imageUrlCached: string;\n isGravatarEnabled: boolean;\n admin: boolean;\n readOnly: boolean;\n apiToken?: string;\n isEmailPublished: boolean;\n isInvitationEmailSended: boolean;\n lang: Lang;\n slackMemberId?: string;\n createdAt: Date;\n lastLoginAt?: Date;\n contributionsMigratedAt?: Date;\n introduction: string;\n status: IUserStatus;\n};\n\nexport type IUserGroupRelation = {\n relatedGroup: Ref<IUserGroup>;\n relatedUser: Ref<IUser>;\n createdAt: Date;\n};\n\nexport type IUserGroup = {\n name: string;\n createdAt: Date;\n description: string;\n parent: Ref<IUserGroup> | null;\n};\n\nexport const USER_STATUS = {\n REGISTERED: 1,\n ACTIVE: 2,\n SUSPENDED: 3,\n DELETED: 4,\n INVITED: 5,\n} as const;\nexport type IUserStatus = (typeof USER_STATUS)[keyof typeof USER_STATUS];\n\nexport type IUserHasId = IUser & HasObjectId;\nexport type IUserGroupHasId = IUserGroup & HasObjectId;\nexport type IUserGroupRelationHasId = IUserGroupRelation & HasObjectId;\n\nexport type IAdminExternalAccount<P> = {\n _id: string;\n providerType: P;\n accountId: string;\n user: IUser;\n createdAt: Date;\n};\n"],"names":["USER_STATUS"],"mappings":"AAyCO,MAAMA,IAAc;AAAA,EACzB,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,SAAS;AAAA,EACT,SAAS;AACX;"}
|
|
1
|
+
{"version":3,"file":"user.js","sources":["../../src/interfaces/user.ts"],"sourcesContent":["import type { IAttachment } from './attachment.js';\nimport type { Ref } from './common.js';\nimport type { HasObjectId } from './has-object-id.js';\nimport type { Lang } from './lang.js';\n\nexport type IUser = {\n name: string;\n username: string;\n email: string;\n password: string;\n image?: string; // for backward conpatibility\n imageAttachment?: Ref<IAttachment>;\n imageUrlCached: string;\n isGravatarEnabled: boolean;\n admin: boolean;\n readOnly: boolean;\n apiToken?: string;\n isEmailPublished: boolean;\n isInvitationEmailSended: boolean;\n lang: Lang;\n slackMemberId?: string;\n createdAt: Date;\n lastLoginAt?: Date;\n contributionsMigratedAt?: Date;\n introduction: string;\n status: IUserStatus;\n};\n\nexport type IUserGroupRelation = {\n relatedGroup: Ref<IUserGroup>;\n relatedUser: Ref<IUser>;\n createdAt: Date;\n};\n\nexport type IUserGroup = {\n name: string;\n createdAt: Date;\n description: string;\n parent: Ref<IUserGroup> | null;\n};\n\nexport const USER_STATUS = {\n REGISTERED: 1,\n ACTIVE: 2,\n SUSPENDED: 3,\n DELETED: 4,\n INVITED: 5,\n} as const;\nexport type IUserStatus = (typeof USER_STATUS)[keyof typeof USER_STATUS];\n\nexport type IUserHasId = IUser & HasObjectId;\nexport type IUserGroupHasId = IUserGroup & HasObjectId;\nexport type IUserGroupRelationHasId = IUserGroupRelation & HasObjectId;\n\nexport type IAdminExternalAccount<P> = {\n _id: string;\n providerType: P;\n accountId: string;\n user: IUser;\n createdAt: Date;\n};\n"],"names":["USER_STATUS"],"mappings":"AAyCO,MAAMA,IAAc;AAAA,EACzB,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,SAAS;AAAA,EACT,SAAS;AACX;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault-compose-view.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Namespace } from './vault-instruction.js';
|
|
2
|
+
/** Request body for the POST /internal/compose-view RPC call to vault-manager. */
|
|
3
|
+
export interface ComposeViewRequest {
|
|
4
|
+
readonly userId: string | null;
|
|
5
|
+
readonly namespaces: ReadonlyArray<Namespace>;
|
|
6
|
+
}
|
|
7
|
+
/** Response from the compose-view RPC. viewRef identifies the per-user ephemeral view. */
|
|
8
|
+
export interface ComposeViewResponse {
|
|
9
|
+
readonly viewRef: string;
|
|
10
|
+
readonly commitOid: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault-compose-view.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault-instruction.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Supported operations that can be issued to vault-manager via vault_instructions. */
|
|
2
|
+
export type VaultInstructionOp = 'upsert' | 'bulk-upsert' | 'remove' | 'rename-prefix' | 'grant-change-prefix' | 'reset-all';
|
|
3
|
+
/** A vault namespace string. Format: 'public' | 'restricted-link' | `group-${string}` | `user-${string}-only-me` */
|
|
4
|
+
export type Namespace = string;
|
|
5
|
+
/** A single entry in a bulk-upsert instruction. */
|
|
6
|
+
export interface VaultBulkUpsertEntry {
|
|
7
|
+
readonly pageId: string;
|
|
8
|
+
readonly pagePath: string;
|
|
9
|
+
readonly revisionId: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Payload embedded inside a VaultInstructionDoc.
|
|
13
|
+
* namespace is optional — undefined when op === 'reset-all'.
|
|
14
|
+
* All other fields are optional and op-dependent.
|
|
15
|
+
*/
|
|
16
|
+
export interface VaultInstructionPayload {
|
|
17
|
+
readonly namespace?: Namespace;
|
|
18
|
+
readonly pageId?: string;
|
|
19
|
+
readonly pagePath?: string;
|
|
20
|
+
readonly revisionId?: string;
|
|
21
|
+
readonly entries?: ReadonlyArray<VaultBulkUpsertEntry>;
|
|
22
|
+
readonly oldPrefix?: string;
|
|
23
|
+
readonly newPrefix?: string;
|
|
24
|
+
readonly fromNamespace?: Namespace;
|
|
25
|
+
}
|
|
26
|
+
/** A document stored in the vault_instructions collection. op is a top-level field, not inside payload. */
|
|
27
|
+
export interface VaultInstructionDoc {
|
|
28
|
+
readonly _id: string;
|
|
29
|
+
readonly op: VaultInstructionOp;
|
|
30
|
+
readonly payload: VaultInstructionPayload;
|
|
31
|
+
readonly issuedAt: Date;
|
|
32
|
+
readonly processedAt: Date | null;
|
|
33
|
+
readonly attempts: number;
|
|
34
|
+
readonly lastError: string | null;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault-instruction.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault-storage-stats.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Storage observability data returned by GET /internal/storage-stats on vault-manager. */
|
|
2
|
+
export interface StorageStatsResponse {
|
|
3
|
+
readonly namespaceCount: number;
|
|
4
|
+
readonly totalCommitCount: number;
|
|
5
|
+
readonly looseObjectCount: number;
|
|
6
|
+
readonly repoSizeBytes: number;
|
|
7
|
+
/** ISO 8601 timestamp of the last squash operation, or null if never run. */
|
|
8
|
+
readonly lastSquashAt: string | null;
|
|
9
|
+
/** ISO 8601 timestamp of the last GC operation, or null if never run. */
|
|
10
|
+
readonly lastGcAt: string | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault-storage-stats.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devided-page-path.cjs","sources":["../../src/models/devided-page-path.ts"],"sourcesContent":["import * as pathUtils from '../utils/path-utils';\n\n// https://regex101.com/r/BahpKX/2\nconst PATTERN_INCLUDE_DATE =\n /^(.+\\/[^/]+)\\/(\\d{4}|\\d{4}\\/\\d{2}|\\d{4}\\/\\d{2}\\/\\d{2})$/;\n\nexport class DevidedPagePath {\n isRoot: boolean;\n\n isFormerRoot: boolean;\n\n former: string;\n\n latter: string;\n\n constructor(path: string, skipNormalize = false, evalDatePath = false) {\n this.isRoot = false;\n this.isFormerRoot = false;\n this.former = '';\n\n // root\n if (path == null || path === '' || path === '/') {\n this.isRoot = true;\n this.latter = '/';\n return;\n }\n\n const pagePath = skipNormalize ? path : pathUtils.normalizePath(path);\n this.latter = pagePath;\n\n // evaluate date path\n if (evalDatePath) {\n const matchDate = pagePath.match(PATTERN_INCLUDE_DATE);\n if (matchDate != null) {\n this.former = matchDate[1];\n this.latter = matchDate[2];\n return;\n }\n }\n\n let PATTERN_DEFAULT = /^((.*)\\/(?!em>))?(.+)$/; // this will ignore em's end tags\n try {\n // for non-chrome browsers\n // biome-ignore lint/complexity/useRegexLiterals: ignore\n PATTERN_DEFAULT = new RegExp('^((.*)(?<!<)\\\\/)?(.+)$'); // https://regex101.com/r/HJNvMW/1\n } catch {\n // lookbehind regex is not supported on non-chrome browsers\n }\n\n const matchDefault = pagePath.match(PATTERN_DEFAULT);\n if (matchDefault != null) {\n this.isFormerRoot = matchDefault[1] === '/';\n this.former = matchDefault[2];\n this.latter = matchDefault[3];\n }\n }\n}\n"],"names":["PATTERN_INCLUDE_DATE","DevidedPagePath","path","skipNormalize","evalDatePath","__publicField","pagePath","pathUtils.normalizePath","matchDate","PATTERN_DEFAULT","matchDefault"],"mappings":"+RAGMA,EACJ,0DAEK,MAAMC,CAAgB,CAS3B,YAAYC,EAAcC,EAAgB,GAAOC,EAAe,GAAO,CARvEC,EAAA,eAEAA,EAAA,qBAEAA,EAAA,eAEAA,EAAA,eAQE,GALA,KAAK,OAAS,GACd,KAAK,aAAe,GACpB,KAAK,OAAS,GAGVH,GAAQ,MAAQA,IAAS,IAAMA,IAAS,IAAK,CAC/C,KAAK,OAAS,GACd,KAAK,OAAS,IACd,
|
|
1
|
+
{"version":3,"file":"devided-page-path.cjs","sources":["../../src/models/devided-page-path.ts"],"sourcesContent":["import * as pathUtils from '../utils/path-utils.js';\n\n// https://regex101.com/r/BahpKX/2\nconst PATTERN_INCLUDE_DATE =\n /^(.+\\/[^/]+)\\/(\\d{4}|\\d{4}\\/\\d{2}|\\d{4}\\/\\d{2}\\/\\d{2})$/;\n\nexport class DevidedPagePath {\n isRoot: boolean;\n\n isFormerRoot: boolean;\n\n former: string;\n\n latter: string;\n\n constructor(path: string, skipNormalize = false, evalDatePath = false) {\n this.isRoot = false;\n this.isFormerRoot = false;\n this.former = '';\n\n // root\n if (path == null || path === '' || path === '/') {\n this.isRoot = true;\n this.latter = '/';\n return;\n }\n\n const pagePath = skipNormalize ? path : pathUtils.normalizePath(path);\n this.latter = pagePath;\n\n // evaluate date path\n if (evalDatePath) {\n const matchDate = pagePath.match(PATTERN_INCLUDE_DATE);\n if (matchDate != null) {\n this.former = matchDate[1];\n this.latter = matchDate[2];\n return;\n }\n }\n\n let PATTERN_DEFAULT = /^((.*)\\/(?!em>))?(.+)$/; // this will ignore em's end tags\n try {\n // for non-chrome browsers\n // biome-ignore lint/complexity/useRegexLiterals: ignore\n PATTERN_DEFAULT = new RegExp('^((.*)(?<!<)\\\\/)?(.+)$'); // https://regex101.com/r/HJNvMW/1\n } catch {\n // lookbehind regex is not supported on non-chrome browsers\n }\n\n const matchDefault = pagePath.match(PATTERN_DEFAULT);\n if (matchDefault != null) {\n this.isFormerRoot = matchDefault[1] === '/';\n this.former = matchDefault[2];\n this.latter = matchDefault[3];\n }\n }\n}\n"],"names":["PATTERN_INCLUDE_DATE","DevidedPagePath","path","skipNormalize","evalDatePath","__publicField","pagePath","pathUtils.normalizePath","matchDate","PATTERN_DEFAULT","matchDefault"],"mappings":"+RAGMA,EACJ,0DAEK,MAAMC,CAAgB,CAS3B,YAAYC,EAAcC,EAAgB,GAAOC,EAAe,GAAO,CARvEC,EAAA,eAEAA,EAAA,qBAEAA,EAAA,eAEAA,EAAA,eAQE,GALA,KAAK,OAAS,GACd,KAAK,aAAe,GACpB,KAAK,OAAS,GAGVH,GAAQ,MAAQA,IAAS,IAAMA,IAAS,IAAK,CAC/C,KAAK,OAAS,GACd,KAAK,OAAS,IACd,MACF,CAEA,MAAMI,EAAWH,EAAgBD,EAAOK,EAAAA,cAAwBL,CAAI,EAIpE,GAHA,KAAK,OAASI,EAGVF,EAAc,CAChB,MAAMI,EAAYF,EAAS,MAAMN,CAAoB,EACrD,GAAIQ,GAAa,KAAM,CACrB,KAAK,OAASA,EAAU,CAAC,EACzB,KAAK,OAASA,EAAU,CAAC,EACzB,MACF,CACF,CAEA,IAAIC,EAAkB,yBACtB,GAAI,CAGFA,EAAkB,IAAI,OAAO,wBAAwB,CACvD,MAAQ,CAER,CAEA,MAAMC,EAAeJ,EAAS,MAAMG,CAAe,EAC/CC,GAAgB,OAClB,KAAK,aAAeA,EAAa,CAAC,IAAM,IACxC,KAAK,OAASA,EAAa,CAAC,EAC5B,KAAK,OAASA,EAAa,CAAC,EAEhC,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devided-page-path.js","sources":["../../src/models/devided-page-path.ts"],"sourcesContent":["import * as pathUtils from '../utils/path-utils';\n\n// https://regex101.com/r/BahpKX/2\nconst PATTERN_INCLUDE_DATE =\n /^(.+\\/[^/]+)\\/(\\d{4}|\\d{4}\\/\\d{2}|\\d{4}\\/\\d{2}\\/\\d{2})$/;\n\nexport class DevidedPagePath {\n isRoot: boolean;\n\n isFormerRoot: boolean;\n\n former: string;\n\n latter: string;\n\n constructor(path: string, skipNormalize = false, evalDatePath = false) {\n this.isRoot = false;\n this.isFormerRoot = false;\n this.former = '';\n\n // root\n if (path == null || path === '' || path === '/') {\n this.isRoot = true;\n this.latter = '/';\n return;\n }\n\n const pagePath = skipNormalize ? path : pathUtils.normalizePath(path);\n this.latter = pagePath;\n\n // evaluate date path\n if (evalDatePath) {\n const matchDate = pagePath.match(PATTERN_INCLUDE_DATE);\n if (matchDate != null) {\n this.former = matchDate[1];\n this.latter = matchDate[2];\n return;\n }\n }\n\n let PATTERN_DEFAULT = /^((.*)\\/(?!em>))?(.+)$/; // this will ignore em's end tags\n try {\n // for non-chrome browsers\n // biome-ignore lint/complexity/useRegexLiterals: ignore\n PATTERN_DEFAULT = new RegExp('^((.*)(?<!<)\\\\/)?(.+)$'); // https://regex101.com/r/HJNvMW/1\n } catch {\n // lookbehind regex is not supported on non-chrome browsers\n }\n\n const matchDefault = pagePath.match(PATTERN_DEFAULT);\n if (matchDefault != null) {\n this.isFormerRoot = matchDefault[1] === '/';\n this.former = matchDefault[2];\n this.latter = matchDefault[3];\n }\n }\n}\n"],"names":["PATTERN_INCLUDE_DATE","DevidedPagePath","path","skipNormalize","evalDatePath","__publicField","pagePath","pathUtils.normalizePath","matchDate","PATTERN_DEFAULT","matchDefault"],"mappings":";;;;AAGA,MAAMA,IACJ;AAEK,MAAMC,EAAgB;AAAA,EAS3B,YAAYC,GAAcC,IAAgB,IAAOC,IAAe,IAAO;AARvE,IAAAC,EAAA;AAEA,IAAAA,EAAA;AAEA,IAAAA,EAAA;AAEA,IAAAA,EAAA;AAQE,QALA,KAAK,SAAS,IACd,KAAK,eAAe,IACpB,KAAK,SAAS,IAGVH,KAAQ,QAAQA,MAAS,MAAMA,MAAS,KAAK;AAC/C,WAAK,SAAS,IACd,KAAK,SAAS;AACd;AAAA,
|
|
1
|
+
{"version":3,"file":"devided-page-path.js","sources":["../../src/models/devided-page-path.ts"],"sourcesContent":["import * as pathUtils from '../utils/path-utils.js';\n\n// https://regex101.com/r/BahpKX/2\nconst PATTERN_INCLUDE_DATE =\n /^(.+\\/[^/]+)\\/(\\d{4}|\\d{4}\\/\\d{2}|\\d{4}\\/\\d{2}\\/\\d{2})$/;\n\nexport class DevidedPagePath {\n isRoot: boolean;\n\n isFormerRoot: boolean;\n\n former: string;\n\n latter: string;\n\n constructor(path: string, skipNormalize = false, evalDatePath = false) {\n this.isRoot = false;\n this.isFormerRoot = false;\n this.former = '';\n\n // root\n if (path == null || path === '' || path === '/') {\n this.isRoot = true;\n this.latter = '/';\n return;\n }\n\n const pagePath = skipNormalize ? path : pathUtils.normalizePath(path);\n this.latter = pagePath;\n\n // evaluate date path\n if (evalDatePath) {\n const matchDate = pagePath.match(PATTERN_INCLUDE_DATE);\n if (matchDate != null) {\n this.former = matchDate[1];\n this.latter = matchDate[2];\n return;\n }\n }\n\n let PATTERN_DEFAULT = /^((.*)\\/(?!em>))?(.+)$/; // this will ignore em's end tags\n try {\n // for non-chrome browsers\n // biome-ignore lint/complexity/useRegexLiterals: ignore\n PATTERN_DEFAULT = new RegExp('^((.*)(?<!<)\\\\/)?(.+)$'); // https://regex101.com/r/HJNvMW/1\n } catch {\n // lookbehind regex is not supported on non-chrome browsers\n }\n\n const matchDefault = pagePath.match(PATTERN_DEFAULT);\n if (matchDefault != null) {\n this.isFormerRoot = matchDefault[1] === '/';\n this.former = matchDefault[2];\n this.latter = matchDefault[3];\n }\n }\n}\n"],"names":["PATTERN_INCLUDE_DATE","DevidedPagePath","path","skipNormalize","evalDatePath","__publicField","pagePath","pathUtils.normalizePath","matchDate","PATTERN_DEFAULT","matchDefault"],"mappings":";;;;AAGA,MAAMA,IACJ;AAEK,MAAMC,EAAgB;AAAA,EAS3B,YAAYC,GAAcC,IAAgB,IAAOC,IAAe,IAAO;AARvE,IAAAC,EAAA;AAEA,IAAAA,EAAA;AAEA,IAAAA,EAAA;AAEA,IAAAA,EAAA;AAQE,QALA,KAAK,SAAS,IACd,KAAK,eAAe,IACpB,KAAK,SAAS,IAGVH,KAAQ,QAAQA,MAAS,MAAMA,MAAS,KAAK;AAC/C,WAAK,SAAS,IACd,KAAK,SAAS;AACd;AAAA,IACF;AAEA,UAAMI,IAAWH,IAAgBD,IAAOK,EAAwBL,CAAI;AAIpE,QAHA,KAAK,SAASI,GAGVF,GAAc;AAChB,YAAMI,IAAYF,EAAS,MAAMN,CAAoB;AACrD,UAAIQ,KAAa,MAAM;AACrB,aAAK,SAASA,EAAU,CAAC,GACzB,KAAK,SAASA,EAAU,CAAC;AACzB;AAAA,MACF;AAAA,IACF;AAEA,QAAIC,IAAkB;AACtB,QAAI;AAGF,MAAAA,IAAkB,IAAI,OAAO,wBAAwB;AAAA,IACvD,QAAQ;AAAA,IAER;AAEA,UAAMC,IAAeJ,EAAS,MAAMG,CAAe;AACnD,IAAIC,KAAgB,SAClB,KAAK,eAAeA,EAAa,CAAC,MAAM,KACxC,KAAK,SAASA,EAAa,CAAC,GAC5B,KAAK,SAASA,EAAa,CAAC;AAAA,EAEhC;AACF;"}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './devided-page-path';
|
|
2
|
-
export * from './vo/error-apiv3';
|
|
1
|
+
export * from './devided-page-path.js';
|
|
2
|
+
export * from './vo/error-apiv3.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-serializer.cjs","sources":["../../../src/models/serializers/attachment-serializer.ts"],"sourcesContent":["import { Document } from 'mongoose';\n\nimport type { IAttachment, IUser } from '~/interfaces';\n\nimport { isPopulated, isRef, type Ref } from '../../interfaces/common';\nimport {\n type IUserSerializedSecurely,\n serializeUserSecurely,\n} from './user-serializer';\n\nexport type IAttachmentSerializedSecurely<A extends IAttachment> = Omit<\n A,\n 'creator'\n> & { creator?: Ref<IUserSerializedSecurely<IUser>> };\n\nconst omitInsecureAttributes = <A extends IAttachment>(\n attachment: A,\n): IAttachmentSerializedSecurely<A> => {\n const leanDoc =\n attachment instanceof Document ? attachment.toObject<A>() : attachment;\n\n const { creator, ...rest } = leanDoc;\n\n const secureCreator =\n creator == null ? undefined : serializeUserSecurely(creator);\n\n return {\n creator: secureCreator,\n ...rest,\n };\n};\n\nexport function serializeAttachmentSecurely<A extends IAttachment>(\n attachment?: A,\n): IAttachmentSerializedSecurely<A>;\nexport function serializeAttachmentSecurely<A extends IAttachment>(\n attachment?: Ref<A>,\n): Ref<IAttachmentSerializedSecurely<A>>;\nexport function serializeAttachmentSecurely<A extends IAttachment>(\n attachment?: A | Ref<A>,\n):\n | undefined\n | IAttachmentSerializedSecurely<A>\n | Ref<IAttachmentSerializedSecurely<A>> {\n if (attachment == null) return attachment;\n\n if (isRef(attachment) && !isPopulated(attachment)) return attachment;\n\n return omitInsecureAttributes(attachment);\n}\n"],"names":["omitInsecureAttributes","attachment","leanDoc","Document","creator","rest","serializeUserSecurely","serializeAttachmentSecurely","isRef","isPopulated"],"mappings":"wLAeMA,EACJC,GACqC,CACrC,MAAMC,EACJD,aAAsBE,EAAAA,SAAWF,EAAW,
|
|
1
|
+
{"version":3,"file":"attachment-serializer.cjs","sources":["../../../src/models/serializers/attachment-serializer.ts"],"sourcesContent":["import { Document } from 'mongoose';\n\nimport type { IAttachment, IUser } from '~/interfaces';\n\nimport { isPopulated, isRef, type Ref } from '../../interfaces/common.js';\nimport {\n type IUserSerializedSecurely,\n serializeUserSecurely,\n} from './user-serializer.js';\n\nexport type IAttachmentSerializedSecurely<A extends IAttachment> = Omit<\n A,\n 'creator'\n> & { creator?: Ref<IUserSerializedSecurely<IUser>> };\n\nconst omitInsecureAttributes = <A extends IAttachment>(\n attachment: A,\n): IAttachmentSerializedSecurely<A> => {\n const leanDoc =\n attachment instanceof Document ? attachment.toObject<A>() : attachment;\n\n const { creator, ...rest } = leanDoc;\n\n const secureCreator =\n creator == null ? undefined : serializeUserSecurely(creator);\n\n return {\n creator: secureCreator,\n ...rest,\n };\n};\n\nexport function serializeAttachmentSecurely<A extends IAttachment>(\n attachment?: A,\n): IAttachmentSerializedSecurely<A>;\nexport function serializeAttachmentSecurely<A extends IAttachment>(\n attachment?: Ref<A>,\n): Ref<IAttachmentSerializedSecurely<A>>;\nexport function serializeAttachmentSecurely<A extends IAttachment>(\n attachment?: A | Ref<A>,\n):\n | undefined\n | IAttachmentSerializedSecurely<A>\n | Ref<IAttachmentSerializedSecurely<A>> {\n if (attachment == null) return attachment;\n\n if (isRef(attachment) && !isPopulated(attachment)) return attachment;\n\n return omitInsecureAttributes(attachment);\n}\n"],"names":["omitInsecureAttributes","attachment","leanDoc","Document","creator","rest","serializeUserSecurely","serializeAttachmentSecurely","isRef","isPopulated"],"mappings":"wLAeMA,EACJC,GACqC,CACrC,MAAMC,EACJD,aAAsBE,EAAAA,SAAWF,EAAW,WAAgBA,EAExD,CAAE,QAAAG,EAAS,GAAGC,CAAA,EAASH,EAK7B,MAAO,CACL,QAHAE,GAAW,KAAO,OAAYE,EAAAA,sBAAsBF,CAAO,EAI3D,GAAGC,CAAA,CAEP,EAQO,SAASE,EACdN,EAIwC,CAGxC,OAFIA,GAAc,MAEdO,EAAAA,MAAMP,CAAU,GAAK,CAACQ,EAAAA,YAAYR,CAAU,EAAUA,EAEnDD,EAAuBC,CAAU,CAC1C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IAttachment, IUser } from '../../interfaces';
|
|
2
|
-
import { Ref } from '../../interfaces/common';
|
|
3
|
-
import { IUserSerializedSecurely } from './user-serializer';
|
|
2
|
+
import { Ref } from '../../interfaces/common.js';
|
|
3
|
+
import { IUserSerializedSecurely } from './user-serializer.js';
|
|
4
4
|
export type IAttachmentSerializedSecurely<A extends IAttachment> = Omit<A, 'creator'> & {
|
|
5
5
|
creator?: Ref<IUserSerializedSecurely<IUser>>;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-serializer.js","sources":["../../../src/models/serializers/attachment-serializer.ts"],"sourcesContent":["import { Document } from 'mongoose';\n\nimport type { IAttachment, IUser } from '~/interfaces';\n\nimport { isPopulated, isRef, type Ref } from '../../interfaces/common';\nimport {\n type IUserSerializedSecurely,\n serializeUserSecurely,\n} from './user-serializer';\n\nexport type IAttachmentSerializedSecurely<A extends IAttachment> = Omit<\n A,\n 'creator'\n> & { creator?: Ref<IUserSerializedSecurely<IUser>> };\n\nconst omitInsecureAttributes = <A extends IAttachment>(\n attachment: A,\n): IAttachmentSerializedSecurely<A> => {\n const leanDoc =\n attachment instanceof Document ? attachment.toObject<A>() : attachment;\n\n const { creator, ...rest } = leanDoc;\n\n const secureCreator =\n creator == null ? undefined : serializeUserSecurely(creator);\n\n return {\n creator: secureCreator,\n ...rest,\n };\n};\n\nexport function serializeAttachmentSecurely<A extends IAttachment>(\n attachment?: A,\n): IAttachmentSerializedSecurely<A>;\nexport function serializeAttachmentSecurely<A extends IAttachment>(\n attachment?: Ref<A>,\n): Ref<IAttachmentSerializedSecurely<A>>;\nexport function serializeAttachmentSecurely<A extends IAttachment>(\n attachment?: A | Ref<A>,\n):\n | undefined\n | IAttachmentSerializedSecurely<A>\n | Ref<IAttachmentSerializedSecurely<A>> {\n if (attachment == null) return attachment;\n\n if (isRef(attachment) && !isPopulated(attachment)) return attachment;\n\n return omitInsecureAttributes(attachment);\n}\n"],"names":["omitInsecureAttributes","attachment","leanDoc","Document","creator","rest","serializeUserSecurely","serializeAttachmentSecurely","isRef","isPopulated"],"mappings":";;;AAeA,MAAMA,IAAyB,CAC7BC,MACqC;AACrC,QAAMC,IACJD,aAAsBE,IAAWF,EAAW,
|
|
1
|
+
{"version":3,"file":"attachment-serializer.js","sources":["../../../src/models/serializers/attachment-serializer.ts"],"sourcesContent":["import { Document } from 'mongoose';\n\nimport type { IAttachment, IUser } from '~/interfaces';\n\nimport { isPopulated, isRef, type Ref } from '../../interfaces/common.js';\nimport {\n type IUserSerializedSecurely,\n serializeUserSecurely,\n} from './user-serializer.js';\n\nexport type IAttachmentSerializedSecurely<A extends IAttachment> = Omit<\n A,\n 'creator'\n> & { creator?: Ref<IUserSerializedSecurely<IUser>> };\n\nconst omitInsecureAttributes = <A extends IAttachment>(\n attachment: A,\n): IAttachmentSerializedSecurely<A> => {\n const leanDoc =\n attachment instanceof Document ? attachment.toObject<A>() : attachment;\n\n const { creator, ...rest } = leanDoc;\n\n const secureCreator =\n creator == null ? undefined : serializeUserSecurely(creator);\n\n return {\n creator: secureCreator,\n ...rest,\n };\n};\n\nexport function serializeAttachmentSecurely<A extends IAttachment>(\n attachment?: A,\n): IAttachmentSerializedSecurely<A>;\nexport function serializeAttachmentSecurely<A extends IAttachment>(\n attachment?: Ref<A>,\n): Ref<IAttachmentSerializedSecurely<A>>;\nexport function serializeAttachmentSecurely<A extends IAttachment>(\n attachment?: A | Ref<A>,\n):\n | undefined\n | IAttachmentSerializedSecurely<A>\n | Ref<IAttachmentSerializedSecurely<A>> {\n if (attachment == null) return attachment;\n\n if (isRef(attachment) && !isPopulated(attachment)) return attachment;\n\n return omitInsecureAttributes(attachment);\n}\n"],"names":["omitInsecureAttributes","attachment","leanDoc","Document","creator","rest","serializeUserSecurely","serializeAttachmentSecurely","isRef","isPopulated"],"mappings":";;;AAeA,MAAMA,IAAyB,CAC7BC,MACqC;AACrC,QAAMC,IACJD,aAAsBE,IAAWF,EAAW,aAAgBA,GAExD,EAAE,SAAAG,GAAS,GAAGC,EAAA,IAASH;AAK7B,SAAO;AAAA,IACL,SAHAE,KAAW,OAAO,SAAYE,EAAsBF,CAAO;AAAA,IAI3D,GAAGC;AAAA,EAAA;AAEP;AAQO,SAASE,EACdN,GAIwC;AAGxC,SAFIA,KAAc,QAEdO,EAAMP,CAAU,KAAK,CAACQ,EAAYR,CAAU,IAAUA,IAEnDD,EAAuBC,CAAU;AAC1C;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './attachment-serializer';
|
|
2
|
-
export * from './user-serializer';
|
|
1
|
+
export * from './attachment-serializer.js';
|
|
2
|
+
export * from './user-serializer.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-serializer.cjs","sources":["../../../src/models/serializers/user-serializer.ts"],"sourcesContent":["import { Document } from 'mongoose';\n\nimport { isPopulated, isRef, type Ref } from '../../interfaces/common';\nimport type { IUser } from '../../interfaces/user';\n\nexport type IUserSerializedSecurely<U extends IUser> = Omit<\n U,\n 'password' | 'apiToken' | 'email'\n> & { email?: string };\n\nexport const omitInsecureAttributes = <U extends IUser>(\n user: U,\n): IUserSerializedSecurely<U> => {\n const leanDoc = user instanceof Document ? user.toObject<U>() : user;\n\n const { password, apiToken, email, ...rest } = leanDoc;\n\n const secureUser: IUserSerializedSecurely<U> = rest;\n\n // omit email\n if (secureUser.isEmailPublished) {\n secureUser.email = email;\n }\n\n return secureUser;\n};\n\nexport function serializeUserSecurely<U extends IUser>(\n user?: U,\n): IUserSerializedSecurely<U>;\nexport function serializeUserSecurely<U extends IUser>(\n user?: Ref<U>,\n): Ref<IUserSerializedSecurely<U>>;\nexport function serializeUserSecurely<U extends IUser>(\n user?: U | Ref<U>,\n): undefined | IUserSerializedSecurely<U> | Ref<IUserSerializedSecurely<U>> {\n if (user == null) return user;\n\n if (isRef(user) && !isPopulated(user)) return user;\n\n return omitInsecureAttributes(user);\n}\n"],"names":["omitInsecureAttributes","user","leanDoc","Document","password","apiToken","email","rest","secureUser","serializeUserSecurely","isRef","isPopulated"],"mappings":"qJAUaA,EACXC,GAC+B,CAC/B,MAAMC,EAAUD,aAAgBE,EAAAA,SAAWF,EAAK,
|
|
1
|
+
{"version":3,"file":"user-serializer.cjs","sources":["../../../src/models/serializers/user-serializer.ts"],"sourcesContent":["import { Document } from 'mongoose';\n\nimport { isPopulated, isRef, type Ref } from '../../interfaces/common.js';\nimport type { IUser } from '../../interfaces/user.js';\n\nexport type IUserSerializedSecurely<U extends IUser> = Omit<\n U,\n 'password' | 'apiToken' | 'email'\n> & { email?: string };\n\nexport const omitInsecureAttributes = <U extends IUser>(\n user: U,\n): IUserSerializedSecurely<U> => {\n const leanDoc = user instanceof Document ? user.toObject<U>() : user;\n\n const { password, apiToken, email, ...rest } = leanDoc;\n\n const secureUser: IUserSerializedSecurely<U> = rest;\n\n // omit email\n if (secureUser.isEmailPublished) {\n secureUser.email = email;\n }\n\n return secureUser;\n};\n\nexport function serializeUserSecurely<U extends IUser>(\n user?: U,\n): IUserSerializedSecurely<U>;\nexport function serializeUserSecurely<U extends IUser>(\n user?: Ref<U>,\n): Ref<IUserSerializedSecurely<U>>;\nexport function serializeUserSecurely<U extends IUser>(\n user?: U | Ref<U>,\n): undefined | IUserSerializedSecurely<U> | Ref<IUserSerializedSecurely<U>> {\n if (user == null) return user;\n\n if (isRef(user) && !isPopulated(user)) return user;\n\n return omitInsecureAttributes(user);\n}\n"],"names":["omitInsecureAttributes","user","leanDoc","Document","password","apiToken","email","rest","secureUser","serializeUserSecurely","isRef","isPopulated"],"mappings":"qJAUaA,EACXC,GAC+B,CAC/B,MAAMC,EAAUD,aAAgBE,EAAAA,SAAWF,EAAK,WAAgBA,EAE1D,CAAE,SAAAG,EAAU,SAAAC,EAAU,MAAAC,EAAO,GAAGC,GAASL,EAEzCM,EAAyCD,EAG/C,OAAIC,EAAW,mBACbA,EAAW,MAAQF,GAGdE,CACT,EAQO,SAASC,EACdR,EAC0E,CAG1E,OAFIA,GAAQ,MAERS,EAAAA,MAAMT,CAAI,GAAK,CAACU,EAAAA,YAAYV,CAAI,EAAUA,EAEvCD,EAAuBC,CAAI,CACpC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Ref } from '../../interfaces/common';
|
|
2
|
-
import { IUser } from '../../interfaces/user';
|
|
1
|
+
import { Ref } from '../../interfaces/common.js';
|
|
2
|
+
import { IUser } from '../../interfaces/user.js';
|
|
3
3
|
export type IUserSerializedSecurely<U extends IUser> = Omit<U, 'password' | 'apiToken' | 'email'> & {
|
|
4
4
|
email?: string;
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-serializer.js","sources":["../../../src/models/serializers/user-serializer.ts"],"sourcesContent":["import { Document } from 'mongoose';\n\nimport { isPopulated, isRef, type Ref } from '../../interfaces/common';\nimport type { IUser } from '../../interfaces/user';\n\nexport type IUserSerializedSecurely<U extends IUser> = Omit<\n U,\n 'password' | 'apiToken' | 'email'\n> & { email?: string };\n\nexport const omitInsecureAttributes = <U extends IUser>(\n user: U,\n): IUserSerializedSecurely<U> => {\n const leanDoc = user instanceof Document ? user.toObject<U>() : user;\n\n const { password, apiToken, email, ...rest } = leanDoc;\n\n const secureUser: IUserSerializedSecurely<U> = rest;\n\n // omit email\n if (secureUser.isEmailPublished) {\n secureUser.email = email;\n }\n\n return secureUser;\n};\n\nexport function serializeUserSecurely<U extends IUser>(\n user?: U,\n): IUserSerializedSecurely<U>;\nexport function serializeUserSecurely<U extends IUser>(\n user?: Ref<U>,\n): Ref<IUserSerializedSecurely<U>>;\nexport function serializeUserSecurely<U extends IUser>(\n user?: U | Ref<U>,\n): undefined | IUserSerializedSecurely<U> | Ref<IUserSerializedSecurely<U>> {\n if (user == null) return user;\n\n if (isRef(user) && !isPopulated(user)) return user;\n\n return omitInsecureAttributes(user);\n}\n"],"names":["omitInsecureAttributes","user","leanDoc","Document","password","apiToken","email","rest","secureUser","serializeUserSecurely","isRef","isPopulated"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"user-serializer.js","sources":["../../../src/models/serializers/user-serializer.ts"],"sourcesContent":["import { Document } from 'mongoose';\n\nimport { isPopulated, isRef, type Ref } from '../../interfaces/common.js';\nimport type { IUser } from '../../interfaces/user.js';\n\nexport type IUserSerializedSecurely<U extends IUser> = Omit<\n U,\n 'password' | 'apiToken' | 'email'\n> & { email?: string };\n\nexport const omitInsecureAttributes = <U extends IUser>(\n user: U,\n): IUserSerializedSecurely<U> => {\n const leanDoc = user instanceof Document ? user.toObject<U>() : user;\n\n const { password, apiToken, email, ...rest } = leanDoc;\n\n const secureUser: IUserSerializedSecurely<U> = rest;\n\n // omit email\n if (secureUser.isEmailPublished) {\n secureUser.email = email;\n }\n\n return secureUser;\n};\n\nexport function serializeUserSecurely<U extends IUser>(\n user?: U,\n): IUserSerializedSecurely<U>;\nexport function serializeUserSecurely<U extends IUser>(\n user?: Ref<U>,\n): Ref<IUserSerializedSecurely<U>>;\nexport function serializeUserSecurely<U extends IUser>(\n user?: U | Ref<U>,\n): undefined | IUserSerializedSecurely<U> | Ref<IUserSerializedSecurely<U>> {\n if (user == null) return user;\n\n if (isRef(user) && !isPopulated(user)) return user;\n\n return omitInsecureAttributes(user);\n}\n"],"names":["omitInsecureAttributes","user","leanDoc","Document","password","apiToken","email","rest","secureUser","serializeUserSecurely","isRef","isPopulated"],"mappings":";;AAUO,MAAMA,IAAyB,CACpCC,MAC+B;AAC/B,QAAMC,IAAUD,aAAgBE,IAAWF,EAAK,aAAgBA,GAE1D,EAAE,UAAAG,GAAU,UAAAC,GAAU,OAAAC,GAAO,GAAGC,MAASL,GAEzCM,IAAyCD;AAG/C,SAAIC,EAAW,qBACbA,EAAW,QAAQF,IAGdE;AACT;AAQO,SAASC,EACdR,GAC0E;AAG1E,SAFIA,KAAQ,QAERS,EAAMT,CAAI,KAAK,CAACU,EAAYV,CAAI,IAAUA,IAEvCD,EAAuBC,CAAI;AACpC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-apiv3.cjs","sources":["../../../src/models/vo/error-apiv3.ts"],"sourcesContent":["// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport class ErrorV3<ARGS = any> extends Error {\n code: string;\n\n args?: ARGS;\n\n constructor(\n message = '',\n code = '',\n stack = undefined,\n args: ARGS | undefined = undefined,\n ) {\n super(); // do not provide message to the super constructor\n this.message = message;\n this.code = code;\n this.stack = stack;\n this.args = args;\n }\n}\n\n// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport const isErrorV3 = <ARGS = any>(obj: any): obj is ErrorV3<ARGS> => {\n return (\n obj != null && typeof obj === 'object' && 'code' in obj && 'message' in obj\n );\n};\n"],"names":["ErrorV3","message","code","stack","args","__publicField","isErrorV3","obj"],"mappings":"oPACO,MAAMA,UAA4B,KAAM,CAK7C,YACEC,EAAU,GACVC,EAAO,GACPC,EAAQ,OACRC,EAAyB,OACzB,
|
|
1
|
+
{"version":3,"file":"error-apiv3.cjs","sources":["../../../src/models/vo/error-apiv3.ts"],"sourcesContent":["// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport class ErrorV3<ARGS = any> extends Error {\n code: string;\n\n args?: ARGS;\n\n constructor(\n message = '',\n code = '',\n stack = undefined,\n args: ARGS | undefined = undefined,\n ) {\n super(); // do not provide message to the super constructor\n this.message = message;\n this.code = code;\n this.stack = stack;\n this.args = args;\n }\n}\n\n// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport const isErrorV3 = <ARGS = any>(obj: any): obj is ErrorV3<ARGS> => {\n return (\n obj != null && typeof obj === 'object' && 'code' in obj && 'message' in obj\n );\n};\n"],"names":["ErrorV3","message","code","stack","args","__publicField","isErrorV3","obj"],"mappings":"oPACO,MAAMA,UAA4B,KAAM,CAK7C,YACEC,EAAU,GACVC,EAAO,GACPC,EAAQ,OACRC,EAAyB,OACzB,CACA,MAAA,EAVFC,EAAA,aAEAA,EAAA,aASE,KAAK,QAAUJ,EACf,KAAK,KAAOC,EACZ,KAAK,MAAQC,EACb,KAAK,KAAOC,CACd,CACF,CAGO,MAAME,EAAyBC,GAElCA,GAAO,MAAQ,OAAOA,GAAQ,UAAY,SAAUA,GAAO,YAAaA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-apiv3.js","sources":["../../../src/models/vo/error-apiv3.ts"],"sourcesContent":["// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport class ErrorV3<ARGS = any> extends Error {\n code: string;\n\n args?: ARGS;\n\n constructor(\n message = '',\n code = '',\n stack = undefined,\n args: ARGS | undefined = undefined,\n ) {\n super(); // do not provide message to the super constructor\n this.message = message;\n this.code = code;\n this.stack = stack;\n this.args = args;\n }\n}\n\n// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport const isErrorV3 = <ARGS = any>(obj: any): obj is ErrorV3<ARGS> => {\n return (\n obj != null && typeof obj === 'object' && 'code' in obj && 'message' in obj\n );\n};\n"],"names":["ErrorV3","message","code","stack","args","__publicField","isErrorV3","obj"],"mappings":";;;AACO,MAAMA,UAA4B,MAAM;AAAA,EAK7C,YACEC,IAAU,IACVC,IAAO,IACPC,IAAQ,QACRC,IAAyB,QACzB;
|
|
1
|
+
{"version":3,"file":"error-apiv3.js","sources":["../../../src/models/vo/error-apiv3.ts"],"sourcesContent":["// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport class ErrorV3<ARGS = any> extends Error {\n code: string;\n\n args?: ARGS;\n\n constructor(\n message = '',\n code = '',\n stack = undefined,\n args: ARGS | undefined = undefined,\n ) {\n super(); // do not provide message to the super constructor\n this.message = message;\n this.code = code;\n this.stack = stack;\n this.args = args;\n }\n}\n\n// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport const isErrorV3 = <ARGS = any>(obj: any): obj is ErrorV3<ARGS> => {\n return (\n obj != null && typeof obj === 'object' && 'code' in obj && 'message' in obj\n );\n};\n"],"names":["ErrorV3","message","code","stack","args","__publicField","isErrorV3","obj"],"mappings":";;;AACO,MAAMA,UAA4B,MAAM;AAAA,EAK7C,YACEC,IAAU,IACVC,IAAO,IACPC,IAAQ,QACRC,IAAyB,QACzB;AACA,UAAA;AAVF,IAAAC,EAAA;AAEA,IAAAA,EAAA;AASE,SAAK,UAAUJ,GACf,KAAK,OAAOC,GACZ,KAAK,QAAQC,GACb,KAAK,OAAOC;AAAA,EACd;AACF;AAGO,MAAME,IAAY,CAAaC,MAElCA,KAAO,QAAQ,OAAOA,KAAQ,YAAY,UAAUA,KAAO,aAAaA;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './interfaces/option-parser';
|
|
2
|
-
export * from './util/option-parser';
|
|
1
|
+
export * from './interfaces/option-parser.js';
|
|
2
|
+
export * from './util/option-parser.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option-parser.cjs","sources":["../../../src/remark-plugins/util/option-parser.ts"],"sourcesContent":["import type { ParseRangeResult } from '../interfaces/option-parser';\n\n/**\n * Options parser for custom tag\n */\nexport const OptionParser = {\n /**\n * Parse range expression\n *\n * <ul>\n * <li>ex:</li>\n * <ul>\n * <li>1:2 -> { start: 1, end: 2 }</li>\n * <li>1: -> { start: 1, end: -1 }</li>\n * <li>2+3 -> { start: 1, end: 5 }</li>\n * </ul>\n * </ul>\n *\n * @see https://regex101.com/r/w4KCwC/4\n *\n * @static\n * @param {string} str\n * @returns {ParseRangeResult}\n */\n parseRange(str: string): ParseRangeResult | null {\n if (str == null) {\n return null;\n }\n\n // see: https://regex101.com/r/w4KCwC/4\n const match = str.match(/^(-?[0-9]+)(([:+]{1})(-?[0-9]+)?)?$/);\n if (!match) {\n return null;\n }\n\n // determine start\n let start: number;\n let end = -1;\n\n // has operator\n if (match[3] != null) {\n start = +match[1];\n const operator = match[3];\n\n // determine end\n if (operator === ':') {\n end = +match[4] || -1; // set last(-1) if undefined\n } else if (operator === '+') {\n end = +match[4] || 0; // plus zero if undefined\n end += start;\n }\n }\n // don't have operator\n else {\n start = 1;\n end = +match[1];\n }\n\n return { start, end };\n },\n};\n"],"names":["OptionParser","str","match","start","end","operator"],"mappings":"gFAKO,MAAMA,EAAe,CAmB1B,WAAWC,EAAsC,CAC/C,GAAIA,GAAO,
|
|
1
|
+
{"version":3,"file":"option-parser.cjs","sources":["../../../src/remark-plugins/util/option-parser.ts"],"sourcesContent":["import type { ParseRangeResult } from '../interfaces/option-parser.js';\n\n/**\n * Options parser for custom tag\n */\nexport const OptionParser = {\n /**\n * Parse range expression\n *\n * <ul>\n * <li>ex:</li>\n * <ul>\n * <li>1:2 -> { start: 1, end: 2 }</li>\n * <li>1: -> { start: 1, end: -1 }</li>\n * <li>2+3 -> { start: 1, end: 5 }</li>\n * </ul>\n * </ul>\n *\n * @see https://regex101.com/r/w4KCwC/4\n *\n * @static\n * @param {string} str\n * @returns {ParseRangeResult}\n */\n parseRange(str: string): ParseRangeResult | null {\n if (str == null) {\n return null;\n }\n\n // see: https://regex101.com/r/w4KCwC/4\n const match = str.match(/^(-?[0-9]+)(([:+]{1})(-?[0-9]+)?)?$/);\n if (!match) {\n return null;\n }\n\n // determine start\n let start: number;\n let end = -1;\n\n // has operator\n if (match[3] != null) {\n start = +match[1];\n const operator = match[3];\n\n // determine end\n if (operator === ':') {\n end = +match[4] || -1; // set last(-1) if undefined\n } else if (operator === '+') {\n end = +match[4] || 0; // plus zero if undefined\n end += start;\n }\n }\n // don't have operator\n else {\n start = 1;\n end = +match[1];\n }\n\n return { start, end };\n },\n};\n"],"names":["OptionParser","str","match","start","end","operator"],"mappings":"gFAKO,MAAMA,EAAe,CAmB1B,WAAWC,EAAsC,CAC/C,GAAIA,GAAO,KACT,OAAO,KAIT,MAAMC,EAAQD,EAAI,MAAM,qCAAqC,EAC7D,GAAI,CAACC,EACH,OAAO,KAIT,IAAIC,EACAC,EAAM,GAGV,GAAIF,EAAM,CAAC,GAAK,KAAM,CACpBC,EAAQ,CAACD,EAAM,CAAC,EAChB,MAAMG,EAAWH,EAAM,CAAC,EAGpBG,IAAa,IACfD,EAAM,CAACF,EAAM,CAAC,GAAK,GACVG,IAAa,MACtBD,EAAM,CAACF,EAAM,CAAC,GAAK,EACnBE,GAAOD,EAEX,MAGEA,EAAQ,EACRC,EAAM,CAACF,EAAM,CAAC,EAGhB,MAAO,CAAE,MAAAC,EAAO,IAAAC,CAAA,CAClB,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option-parser.js","sources":["../../../src/remark-plugins/util/option-parser.ts"],"sourcesContent":["import type { ParseRangeResult } from '../interfaces/option-parser';\n\n/**\n * Options parser for custom tag\n */\nexport const OptionParser = {\n /**\n * Parse range expression\n *\n * <ul>\n * <li>ex:</li>\n * <ul>\n * <li>1:2 -> { start: 1, end: 2 }</li>\n * <li>1: -> { start: 1, end: -1 }</li>\n * <li>2+3 -> { start: 1, end: 5 }</li>\n * </ul>\n * </ul>\n *\n * @see https://regex101.com/r/w4KCwC/4\n *\n * @static\n * @param {string} str\n * @returns {ParseRangeResult}\n */\n parseRange(str: string): ParseRangeResult | null {\n if (str == null) {\n return null;\n }\n\n // see: https://regex101.com/r/w4KCwC/4\n const match = str.match(/^(-?[0-9]+)(([:+]{1})(-?[0-9]+)?)?$/);\n if (!match) {\n return null;\n }\n\n // determine start\n let start: number;\n let end = -1;\n\n // has operator\n if (match[3] != null) {\n start = +match[1];\n const operator = match[3];\n\n // determine end\n if (operator === ':') {\n end = +match[4] || -1; // set last(-1) if undefined\n } else if (operator === '+') {\n end = +match[4] || 0; // plus zero if undefined\n end += start;\n }\n }\n // don't have operator\n else {\n start = 1;\n end = +match[1];\n }\n\n return { start, end };\n },\n};\n"],"names":["OptionParser","str","match","start","end","operator"],"mappings":"AAKO,MAAMA,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmB1B,WAAWC,GAAsC;AAC/C,QAAIA,KAAO;
|
|
1
|
+
{"version":3,"file":"option-parser.js","sources":["../../../src/remark-plugins/util/option-parser.ts"],"sourcesContent":["import type { ParseRangeResult } from '../interfaces/option-parser.js';\n\n/**\n * Options parser for custom tag\n */\nexport const OptionParser = {\n /**\n * Parse range expression\n *\n * <ul>\n * <li>ex:</li>\n * <ul>\n * <li>1:2 -> { start: 1, end: 2 }</li>\n * <li>1: -> { start: 1, end: -1 }</li>\n * <li>2+3 -> { start: 1, end: 5 }</li>\n * </ul>\n * </ul>\n *\n * @see https://regex101.com/r/w4KCwC/4\n *\n * @static\n * @param {string} str\n * @returns {ParseRangeResult}\n */\n parseRange(str: string): ParseRangeResult | null {\n if (str == null) {\n return null;\n }\n\n // see: https://regex101.com/r/w4KCwC/4\n const match = str.match(/^(-?[0-9]+)(([:+]{1})(-?[0-9]+)?)?$/);\n if (!match) {\n return null;\n }\n\n // determine start\n let start: number;\n let end = -1;\n\n // has operator\n if (match[3] != null) {\n start = +match[1];\n const operator = match[3];\n\n // determine end\n if (operator === ':') {\n end = +match[4] || -1; // set last(-1) if undefined\n } else if (operator === '+') {\n end = +match[4] || 0; // plus zero if undefined\n end += start;\n }\n }\n // don't have operator\n else {\n start = 1;\n end = +match[1];\n }\n\n return { start, end };\n },\n};\n"],"names":["OptionParser","str","match","start","end","operator"],"mappings":"AAKO,MAAMA,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmB1B,WAAWC,GAAsC;AAC/C,QAAIA,KAAO;AACT,aAAO;AAIT,UAAMC,IAAQD,EAAI,MAAM,qCAAqC;AAC7D,QAAI,CAACC;AACH,aAAO;AAIT,QAAIC,GACAC,IAAM;AAGV,QAAIF,EAAM,CAAC,KAAK,MAAM;AACpB,MAAAC,IAAQ,CAACD,EAAM,CAAC;AAChB,YAAMG,IAAWH,EAAM,CAAC;AAGxB,MAAIG,MAAa,MACfD,IAAM,CAACF,EAAM,CAAC,KAAK,KACVG,MAAa,QACtBD,IAAM,CAACF,EAAM,CAAC,KAAK,GACnBE,KAAOD;AAAA,IAEX;AAGE,MAAAA,IAAQ,GACRC,IAAM,CAACF,EAAM,CAAC;AAGhB,WAAO,EAAE,OAAAC,GAAO,KAAAC,EAAA;AAAA,EAClB;AACF;"}
|
package/dist/swr/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './with-utils';
|
|
1
|
+
export * from './with-utils.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-utils.cjs","sources":["../../src/swr/with-utils.ts"],"sourcesContent":["import type { SWRResponse } from 'swr';\n\n// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport type SWRResponseWithUtils<U, D = any, E = any> = SWRResponse<D, E> & U;\n\n// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport const withUtils = <U, D = any, E = any>(\n response: SWRResponse<D, E>,\n utils: U,\n): SWRResponseWithUtils<U, D, E> => {\n return Object.assign(response, utils);\n};\n"],"names":["withUtils","response","utils"],"mappings":"
|
|
1
|
+
{"version":3,"file":"with-utils.cjs","sources":["../../src/swr/with-utils.ts"],"sourcesContent":["import type { SWRResponse } from 'swr';\n\n// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport type SWRResponseWithUtils<U, D = any, E = any> = SWRResponse<D, E> & U;\n\n// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport const withUtils = <U, D = any, E = any>(\n response: SWRResponse<D, E>,\n utils: U,\n): SWRResponseWithUtils<U, D, E> => {\n return Object.assign(response, utils);\n};\n"],"names":["withUtils","response","utils"],"mappings":"gFAMO,MAAMA,EAAY,CACvBC,EACAC,IAEO,OAAO,OAAOD,EAAUC,CAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-utils.js","sources":["../../src/swr/with-utils.ts"],"sourcesContent":["import type { SWRResponse } from 'swr';\n\n// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport type SWRResponseWithUtils<U, D = any, E = any> = SWRResponse<D, E> & U;\n\n// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport const withUtils = <U, D = any, E = any>(\n response: SWRResponse<D, E>,\n utils: U,\n): SWRResponseWithUtils<U, D, E> => {\n return Object.assign(response, utils);\n};\n"],"names":["withUtils","response","utils"],"mappings":"
|
|
1
|
+
{"version":3,"file":"with-utils.js","sources":["../../src/swr/with-utils.ts"],"sourcesContent":["import type { SWRResponse } from 'swr';\n\n// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport type SWRResponseWithUtils<U, D = any, E = any> = SWRResponse<D, E> & U;\n\n// biome-ignore lint/suspicious/noExplicitAny: ignore\nexport const withUtils = <U, D = any, E = any>(\n response: SWRResponse<D, E>,\n utils: U,\n): SWRResponseWithUtils<U, D, E> => {\n return Object.assign(response, utils);\n};\n"],"names":["withUtils","response","utils"],"mappings":"AAMO,MAAMA,IAAY,CACvBC,GACAC,MAEO,OAAO,OAAOD,GAAUC,CAAK;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-utils.cjs","sources":["../../src/utils/browser-utils.ts"],"sourcesContent":["export const isClient = (): boolean => {\n return (\n typeof window !== 'undefined' ||\n (typeof navigator !== 'undefined' && navigator.webdriver)\n );\n};\n\nexport const isServer = (): boolean => {\n return !isClient();\n};\n"],"names":["isClient","isServer"],"mappings":"gFAAO,MAAMA,EAAW,IAEpB,OAAO,OAAW,KACjB,OAAO,UAAc,KAAe,UAAU,UAItCC,EAAW,IACf,CAACD,
|
|
1
|
+
{"version":3,"file":"browser-utils.cjs","sources":["../../src/utils/browser-utils.ts"],"sourcesContent":["export const isClient = (): boolean => {\n return (\n typeof window !== 'undefined' ||\n (typeof navigator !== 'undefined' && navigator.webdriver)\n );\n};\n\nexport const isServer = (): boolean => {\n return !isClient();\n};\n"],"names":["isClient","isServer"],"mappings":"gFAAO,MAAMA,EAAW,IAEpB,OAAO,OAAW,KACjB,OAAO,UAAc,KAAe,UAAU,UAItCC,EAAW,IACf,CAACD,EAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-utils.js","sources":["../../src/utils/browser-utils.ts"],"sourcesContent":["export const isClient = (): boolean => {\n return (\n typeof window !== 'undefined' ||\n (typeof navigator !== 'undefined' && navigator.webdriver)\n );\n};\n\nexport const isServer = (): boolean => {\n return !isClient();\n};\n"],"names":["isClient","isServer"],"mappings":"AAAO,MAAMA,IAAW,MAEpB,OAAO,SAAW,OACjB,OAAO,YAAc,OAAe,UAAU,WAItCC,IAAW,MACf,CAACD,
|
|
1
|
+
{"version":3,"file":"browser-utils.js","sources":["../../src/utils/browser-utils.ts"],"sourcesContent":["export const isClient = (): boolean => {\n return (\n typeof window !== 'undefined' ||\n (typeof navigator !== 'undefined' && navigator.webdriver)\n );\n};\n\nexport const isServer = (): boolean => {\n return !isClient();\n};\n"],"names":["isClient","isServer"],"mappings":"AAAO,MAAMA,IAAW,MAEpB,OAAO,SAAW,OACjB,OAAO,YAAc,OAAe,UAAU,WAItCC,IAAW,MACf,CAACD,EAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-utils.cjs","sources":["../../src/utils/env-utils.ts"],"sourcesContent":["/**\n * convert to boolean\n *\n */\nexport function toBoolean(value: string): boolean {\n return /^(true|1)$/i.test(value);\n}\n"],"names":["toBoolean","value"],"mappings":"gFAIO,SAASA,EAAUC,EAAwB,
|
|
1
|
+
{"version":3,"file":"env-utils.cjs","sources":["../../src/utils/env-utils.ts"],"sourcesContent":["/**\n * convert to boolean\n *\n */\nexport function toBoolean(value: string): boolean {\n return /^(true|1)$/i.test(value);\n}\n"],"names":["toBoolean","value"],"mappings":"gFAIO,SAASA,EAAUC,EAAwB,CAChD,MAAO,cAAc,KAAKA,CAAK,CACjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-utils.js","sources":["../../src/utils/env-utils.ts"],"sourcesContent":["/**\n * convert to boolean\n *\n */\nexport function toBoolean(value: string): boolean {\n return /^(true|1)$/i.test(value);\n}\n"],"names":["toBoolean","value"],"mappings":"AAIO,SAASA,EAAUC,GAAwB;
|
|
1
|
+
{"version":3,"file":"env-utils.js","sources":["../../src/utils/env-utils.ts"],"sourcesContent":["/**\n * convert to boolean\n *\n */\nexport function toBoolean(value: string): boolean {\n return /^(true|1)$/i.test(value);\n}\n"],"names":["toBoolean","value"],"mappings":"AAIO,SAASA,EAAUC,GAAwB;AAChD,SAAO,cAAc,KAAKA,CAAK;AACjC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escape-string-for-regex.cjs","sources":["../../src/utils/escape-string-for-regex.ts"],"sourcesContent":["/**\n * Escape a string for safe use inside a regular expression that is sent to MongoDB\n * (`$regex` / `new RegExp(...)` used in a query). MongoDB evaluates regular expressions\n * with the PCRE2 engine.\n *\n * Why not `RegExp.escape()`:\n * Node.js 24's built-in `RegExp.escape()` escapes non-ASCII whitespace\n * (code points >= U+0100, e.g. U+3000 IDEOGRAPHIC SPACE) into `\\uXXXX` form.\n * PCRE2 does not support `\\u`, so such a pattern makes MongoDB throw\n * \"Regular expression is invalid: PCRE2 does not support ... \\u\" (error 51091).\n *\n * This helper instead escapes only regex metacharacters and passes every other\n * character through literally — behaviourally identical to `escape-string-regexp` v5,\n * which is what GROWI used before the v7.5.0 refactor. The output never contains `\\u`,\n * so it is safe to hand to MongoDB.\n *\n * Use this (not `RegExp.escape`) whenever the resulting pattern is sent to MongoDB.\n * For in-process JS regex (`.test()` / `.replace()`), `RegExp.escape` is fine.\n */\nexport const escapeStringForMongoRegex = (str: string): string => {\n return str.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n};\n"],"names":["escapeStringForMongoRegex","str"],"mappings":"
|
|
1
|
+
{"version":3,"file":"escape-string-for-regex.cjs","sources":["../../src/utils/escape-string-for-regex.ts"],"sourcesContent":["/**\n * Escape a string for safe use inside a regular expression that is sent to MongoDB\n * (`$regex` / `new RegExp(...)` used in a query). MongoDB evaluates regular expressions\n * with the PCRE2 engine.\n *\n * Why not `RegExp.escape()`:\n * Node.js 24's built-in `RegExp.escape()` escapes non-ASCII whitespace\n * (code points >= U+0100, e.g. U+3000 IDEOGRAPHIC SPACE) into `\\uXXXX` form.\n * PCRE2 does not support `\\u`, so such a pattern makes MongoDB throw\n * \"Regular expression is invalid: PCRE2 does not support ... \\u\" (error 51091).\n *\n * This helper instead escapes only regex metacharacters and passes every other\n * character through literally — behaviourally identical to `escape-string-regexp` v5,\n * which is what GROWI used before the v7.5.0 refactor. The output never contains `\\u`,\n * so it is safe to hand to MongoDB.\n *\n * Use this (not `RegExp.escape`) whenever the resulting pattern is sent to MongoDB.\n * For in-process JS regex (`.test()` / `.replace()`), `RegExp.escape` is fine.\n */\nexport const escapeStringForMongoRegex = (str: string): string => {\n return str.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n};\n"],"names":["escapeStringForMongoRegex","str"],"mappings":"gFAmBO,MAAMA,EAA6BC,GACjCA,EAAI,QAAQ,sBAAuB,MAAM,EAAE,QAAQ,KAAM,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escape-string-for-regex.js","sources":["../../src/utils/escape-string-for-regex.ts"],"sourcesContent":["/**\n * Escape a string for safe use inside a regular expression that is sent to MongoDB\n * (`$regex` / `new RegExp(...)` used in a query). MongoDB evaluates regular expressions\n * with the PCRE2 engine.\n *\n * Why not `RegExp.escape()`:\n * Node.js 24's built-in `RegExp.escape()` escapes non-ASCII whitespace\n * (code points >= U+0100, e.g. U+3000 IDEOGRAPHIC SPACE) into `\\uXXXX` form.\n * PCRE2 does not support `\\u`, so such a pattern makes MongoDB throw\n * \"Regular expression is invalid: PCRE2 does not support ... \\u\" (error 51091).\n *\n * This helper instead escapes only regex metacharacters and passes every other\n * character through literally — behaviourally identical to `escape-string-regexp` v5,\n * which is what GROWI used before the v7.5.0 refactor. The output never contains `\\u`,\n * so it is safe to hand to MongoDB.\n *\n * Use this (not `RegExp.escape`) whenever the resulting pattern is sent to MongoDB.\n * For in-process JS regex (`.test()` / `.replace()`), `RegExp.escape` is fine.\n */\nexport const escapeStringForMongoRegex = (str: string): string => {\n return str.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n};\n"],"names":["escapeStringForMongoRegex","str"],"mappings":"
|
|
1
|
+
{"version":3,"file":"escape-string-for-regex.js","sources":["../../src/utils/escape-string-for-regex.ts"],"sourcesContent":["/**\n * Escape a string for safe use inside a regular expression that is sent to MongoDB\n * (`$regex` / `new RegExp(...)` used in a query). MongoDB evaluates regular expressions\n * with the PCRE2 engine.\n *\n * Why not `RegExp.escape()`:\n * Node.js 24's built-in `RegExp.escape()` escapes non-ASCII whitespace\n * (code points >= U+0100, e.g. U+3000 IDEOGRAPHIC SPACE) into `\\uXXXX` form.\n * PCRE2 does not support `\\u`, so such a pattern makes MongoDB throw\n * \"Regular expression is invalid: PCRE2 does not support ... \\u\" (error 51091).\n *\n * This helper instead escapes only regex metacharacters and passes every other\n * character through literally — behaviourally identical to `escape-string-regexp` v5,\n * which is what GROWI used before the v7.5.0 refactor. The output never contains `\\u`,\n * so it is safe to hand to MongoDB.\n *\n * Use this (not `RegExp.escape`) whenever the resulting pattern is sent to MongoDB.\n * For in-process JS regex (`.test()` / `.replace()`), `RegExp.escape` is fine.\n */\nexport const escapeStringForMongoRegex = (str: string): string => {\n return str.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n};\n"],"names":["escapeStringForMongoRegex","str"],"mappings":"AAmBO,MAAMA,IAA4B,CAACC,MACjCA,EAAI,QAAQ,uBAAuB,MAAM,EAAE,QAAQ,MAAM,OAAO;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-event-target.cjs","sources":["../../src/utils/global-event-target.ts"],"sourcesContent":["class GlobalEventTarget extends EventTarget {\n private static instance: GlobalEventTarget;\n\n static getInstance(): GlobalEventTarget {\n if (!GlobalEventTarget.instance) {\n GlobalEventTarget.instance = new GlobalEventTarget();\n }\n return GlobalEventTarget.instance;\n }\n}\n\nexport const globalEventTarget = GlobalEventTarget.getInstance();\n"],"names":["_GlobalEventTarget","__publicField","GlobalEventTarget","globalEventTarget"],"mappings":"oPAAA,MAAMA,EAAN,MAAMA,UAA0B,WAAY,CAG1C,OAAO,aAAiC,
|
|
1
|
+
{"version":3,"file":"global-event-target.cjs","sources":["../../src/utils/global-event-target.ts"],"sourcesContent":["class GlobalEventTarget extends EventTarget {\n private static instance: GlobalEventTarget;\n\n static getInstance(): GlobalEventTarget {\n if (!GlobalEventTarget.instance) {\n GlobalEventTarget.instance = new GlobalEventTarget();\n }\n return GlobalEventTarget.instance;\n }\n}\n\nexport const globalEventTarget = GlobalEventTarget.getInstance();\n"],"names":["_GlobalEventTarget","__publicField","GlobalEventTarget","globalEventTarget"],"mappings":"oPAAA,MAAMA,EAAN,MAAMA,UAA0B,WAAY,CAG1C,OAAO,aAAiC,CACtC,OAAKA,EAAkB,WACrBA,EAAkB,SAAW,IAAIA,GAE5BA,EAAkB,QAC3B,CACF,EAREC,EADID,EACW,YADjB,IAAME,EAANF,EAWO,MAAMG,EAAoBD,EAAkB,YAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-event-target.js","sources":["../../src/utils/global-event-target.ts"],"sourcesContent":["class GlobalEventTarget extends EventTarget {\n private static instance: GlobalEventTarget;\n\n static getInstance(): GlobalEventTarget {\n if (!GlobalEventTarget.instance) {\n GlobalEventTarget.instance = new GlobalEventTarget();\n }\n return GlobalEventTarget.instance;\n }\n}\n\nexport const globalEventTarget = GlobalEventTarget.getInstance();\n"],"names":["_GlobalEventTarget","__publicField","GlobalEventTarget","globalEventTarget"],"mappings":";;;AAAA,MAAMA,IAAN,MAAMA,UAA0B,YAAY;AAAA,EAG1C,OAAO,cAAiC;
|
|
1
|
+
{"version":3,"file":"global-event-target.js","sources":["../../src/utils/global-event-target.ts"],"sourcesContent":["class GlobalEventTarget extends EventTarget {\n private static instance: GlobalEventTarget;\n\n static getInstance(): GlobalEventTarget {\n if (!GlobalEventTarget.instance) {\n GlobalEventTarget.instance = new GlobalEventTarget();\n }\n return GlobalEventTarget.instance;\n }\n}\n\nexport const globalEventTarget = GlobalEventTarget.getInstance();\n"],"names":["_GlobalEventTarget","__publicField","GlobalEventTarget","globalEventTarget"],"mappings":";;;AAAA,MAAMA,IAAN,MAAMA,UAA0B,YAAY;AAAA,EAG1C,OAAO,cAAiC;AACtC,WAAKA,EAAkB,aACrBA,EAAkB,WAAW,IAAIA,EAAA,IAE5BA,EAAkB;AAAA,EAC3B;AACF;AAREC,EADID,GACW;AADjB,IAAME,IAANF;AAWO,MAAMG,IAAoBD,EAAkB,YAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"growi-theme-metadata.cjs","sources":["../../src/utils/growi-theme-metadata.ts"],"sourcesContent":["import type { ColorScheme } from '../interfaces/color-scheme';\nimport { GrowiThemeSchemeType } from '../interfaces/growi-theme-metadata';\n\nexport const getForcedColorScheme = (\n growiThemeSchemeType?: GrowiThemeSchemeType,\n): ColorScheme | undefined => {\n return growiThemeSchemeType == null ||\n growiThemeSchemeType === GrowiThemeSchemeType.BOTH\n ? undefined\n : (growiThemeSchemeType as ColorScheme);\n};\n"],"names":["getForcedColorScheme","growiThemeSchemeType","GrowiThemeSchemeType"],"mappings":"0IAGaA,EACXC,GAEOA,GAAwB,MAC7BA,IAAyBC,EAAAA,qBAAqB,KAC5C,OACCD"}
|
|
1
|
+
{"version":3,"file":"growi-theme-metadata.cjs","sources":["../../src/utils/growi-theme-metadata.ts"],"sourcesContent":["import type { ColorScheme } from '../interfaces/color-scheme.js';\nimport { GrowiThemeSchemeType } from '../interfaces/growi-theme-metadata.js';\n\nexport const getForcedColorScheme = (\n growiThemeSchemeType?: GrowiThemeSchemeType,\n): ColorScheme | undefined => {\n return growiThemeSchemeType == null ||\n growiThemeSchemeType === GrowiThemeSchemeType.BOTH\n ? undefined\n : (growiThemeSchemeType as ColorScheme);\n};\n"],"names":["getForcedColorScheme","growiThemeSchemeType","GrowiThemeSchemeType"],"mappings":"0IAGaA,EACXC,GAEOA,GAAwB,MAC7BA,IAAyBC,EAAAA,qBAAqB,KAC5C,OACCD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ColorScheme } from '../interfaces/color-scheme';
|
|
2
|
-
import { GrowiThemeSchemeType } from '../interfaces/growi-theme-metadata';
|
|
1
|
+
import { ColorScheme } from '../interfaces/color-scheme.js';
|
|
2
|
+
import { GrowiThemeSchemeType } from '../interfaces/growi-theme-metadata.js';
|
|
3
3
|
export declare const getForcedColorScheme: (growiThemeSchemeType?: GrowiThemeSchemeType) => ColorScheme | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"growi-theme-metadata.js","sources":["../../src/utils/growi-theme-metadata.ts"],"sourcesContent":["import type { ColorScheme } from '../interfaces/color-scheme';\nimport { GrowiThemeSchemeType } from '../interfaces/growi-theme-metadata';\n\nexport const getForcedColorScheme = (\n growiThemeSchemeType?: GrowiThemeSchemeType,\n): ColorScheme | undefined => {\n return growiThemeSchemeType == null ||\n growiThemeSchemeType === GrowiThemeSchemeType.BOTH\n ? undefined\n : (growiThemeSchemeType as ColorScheme);\n};\n"],"names":["getForcedColorScheme","growiThemeSchemeType","GrowiThemeSchemeType"],"mappings":";
|
|
1
|
+
{"version":3,"file":"growi-theme-metadata.js","sources":["../../src/utils/growi-theme-metadata.ts"],"sourcesContent":["import type { ColorScheme } from '../interfaces/color-scheme.js';\nimport { GrowiThemeSchemeType } from '../interfaces/growi-theme-metadata.js';\n\nexport const getForcedColorScheme = (\n growiThemeSchemeType?: GrowiThemeSchemeType,\n): ColorScheme | undefined => {\n return growiThemeSchemeType == null ||\n growiThemeSchemeType === GrowiThemeSchemeType.BOTH\n ? undefined\n : (growiThemeSchemeType as ColorScheme);\n};\n"],"names":["getForcedColorScheme","growiThemeSchemeType","GrowiThemeSchemeType"],"mappings":";AAGO,MAAMA,IAAuB,CAClCC,MAEOA,KAAwB,QAC7BA,MAAyBC,EAAqB,OAC5C,SACCD;"}
|