target-supabase-sdk 0.2.0 → 0.2.1
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/README.md +127 -10
- package/dist/browser.d.ts +44 -36
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +6 -45
- package/dist/browser.js.map +1 -1
- package/dist/chunks/create-logger-DyH3mZ8p.js +1028 -0
- package/dist/chunks/create-logger-DyH3mZ8p.js.map +1 -0
- package/dist/chunks/enable-log-persist-C_bSw6Kx.js +1362 -0
- package/dist/chunks/enable-log-persist-C_bSw6Kx.js.map +1 -0
- package/dist/chunks/word.interface-DLgRobKV.js +1973 -0
- package/dist/chunks/word.interface-DLgRobKV.js.map +1 -0
- package/dist/command/command.api.d.ts +1 -1
- package/dist/command/command.api.d.ts.map +1 -1
- package/dist/command/command.interface.d.ts +1 -1
- package/dist/command/command.interface.d.ts.map +1 -1
- package/dist/core.api.d.ts +10 -6
- package/dist/core.api.d.ts.map +1 -1
- package/dist/core.interface.d.ts +3 -2
- package/dist/core.interface.d.ts.map +1 -1
- package/dist/core.utils.d.ts +1 -1
- package/dist/core.utils.d.ts.map +1 -1
- package/dist/idea/idea.interface.d.ts +1 -1
- package/dist/idea/idea.interface.d.ts.map +1 -1
- package/dist/link/link.api.d.ts +1 -1
- package/dist/link/link.api.d.ts.map +1 -1
- package/dist/link/link.interface.d.ts +2 -2
- package/dist/link/link.interface.d.ts.map +1 -1
- package/dist/list/list.api.d.ts +3 -1
- package/dist/list/list.api.d.ts.map +1 -1
- package/dist/list/list.interface.d.ts +2 -2
- package/dist/list/list.interface.d.ts.map +1 -1
- package/dist/node/env/env-parsers.d.ts +19 -0
- package/dist/node/env/env-parsers.d.ts.map +1 -0
- package/dist/node/env/index.d.ts +11 -0
- package/dist/node/env/index.d.ts.map +1 -0
- package/dist/node/env/init-supabase-from-env.d.ts +17 -0
- package/dist/node/env/init-supabase-from-env.d.ts.map +1 -0
- package/dist/node/env/load-env.d.ts +20 -0
- package/dist/node/env/load-env.d.ts.map +1 -0
- package/dist/node/env/project-root.d.ts +11 -0
- package/dist/node/env/project-root.d.ts.map +1 -0
- package/dist/node/env/public-base-url.d.ts +10 -0
- package/dist/node/env/public-base-url.d.ts.map +1 -0
- package/dist/node/env/require-env.d.ts +3 -0
- package/dist/node/env/require-env.d.ts.map +1 -0
- package/dist/node/fs/json-state-store.d.ts +19 -0
- package/dist/node/fs/json-state-store.d.ts.map +1 -0
- package/dist/node/fs/read-source-file.d.ts +19 -0
- package/dist/node/fs/read-source-file.d.ts.map +1 -0
- package/dist/node/node-liveness.d.ts +30 -0
- package/dist/node/node-liveness.d.ts.map +1 -0
- package/dist/node/node-runtime.base.d.ts +21 -3
- package/dist/node/node-runtime.base.d.ts.map +1 -1
- package/dist/node/node.api.d.ts +1 -1
- package/dist/node/node.api.d.ts.map +1 -1
- package/dist/node/node.interface.d.ts +1 -6
- package/dist/node/node.interface.d.ts.map +1 -1
- package/dist/node/preload/run-service-preload.d.ts +14 -0
- package/dist/node/preload/run-service-preload.d.ts.map +1 -0
- package/dist/node/preload/service-preload.interface.d.ts +15 -0
- package/dist/node/preload/service-preload.interface.d.ts.map +1 -0
- package/dist/node/process/index.d.ts +5 -0
- package/dist/node/process/index.d.ts.map +1 -0
- package/dist/node/process/managed-child-processes.d.ts +37 -0
- package/dist/node/process/managed-child-processes.d.ts.map +1 -0
- package/dist/node/process/process-spawn.d.ts +27 -0
- package/dist/node/process/process-spawn.d.ts.map +1 -0
- package/dist/node/readiness/index.d.ts +9 -0
- package/dist/node/readiness/index.d.ts.map +1 -0
- package/dist/node/readiness/poll-until.d.ts +11 -0
- package/dist/node/readiness/poll-until.d.ts.map +1 -0
- package/dist/node/readiness/readiness-checks.d.ts +22 -0
- package/dist/node/readiness/readiness-checks.d.ts.map +1 -0
- package/dist/node/readiness/readiness.types.d.ts +12 -0
- package/dist/node/readiness/readiness.types.d.ts.map +1 -0
- package/dist/node/readiness/run-readiness-checks.d.ts +4 -0
- package/dist/node/readiness/run-readiness-checks.d.ts.map +1 -0
- package/dist/node/readiness/service-ready-gate.d.ts +26 -0
- package/dist/node/readiness/service-ready-gate.d.ts.map +1 -0
- package/dist/node.d.ts +26 -12
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +2482 -18
- package/dist/node.js.map +1 -1
- package/dist/parcel/chunk-fetch-registry.d.ts +14 -0
- package/dist/parcel/chunk-fetch-registry.d.ts.map +1 -0
- package/dist/parcel/chunk-url.utils.d.ts +9 -0
- package/dist/parcel/chunk-url.utils.d.ts.map +1 -0
- package/dist/parcel/parcel-manager.d.ts +44 -20
- package/dist/parcel/parcel-manager.d.ts.map +1 -1
- package/dist/parcel/parcel.api.d.ts +306 -0
- package/dist/parcel/parcel.api.d.ts.map +1 -0
- package/dist/parcel/parcel.interface.d.ts +26 -5
- package/dist/parcel/parcel.interface.d.ts.map +1 -1
- package/dist/parcel/parcel.service.d.ts +38 -0
- package/dist/parcel/parcel.service.d.ts.map +1 -0
- package/dist/parcel/storage-provider-registry.d.ts +17 -0
- package/dist/parcel/storage-provider-registry.d.ts.map +1 -0
- package/dist/parcel/storage-provider.types.d.ts +31 -0
- package/dist/parcel/storage-provider.types.d.ts.map +1 -0
- package/dist/preload.d.ts +7 -0
- package/dist/preload.d.ts.map +1 -0
- package/dist/preload.js +47 -0
- package/dist/preload.js.map +1 -0
- package/dist/repo/repo-context.utils.d.ts.map +1 -1
- package/dist/repo/repo-manager.d.ts +1 -1
- package/dist/repo/repo-manager.d.ts.map +1 -1
- package/dist/repo/repo.api.d.ts +1 -1
- package/dist/repo/repo.api.d.ts.map +1 -1
- package/dist/repo/repo.interface.d.ts +1 -1
- package/dist/repo/repo.interface.d.ts.map +1 -1
- package/dist/repo/repo.script-loader.d.ts +3 -3
- package/dist/repo/repo.script-loader.d.ts.map +1 -1
- package/dist/service/base.interface.d.ts +54 -57
- package/dist/service/base.interface.d.ts.map +1 -1
- package/dist/service/index.d.ts +21 -0
- package/dist/service/index.d.ts.map +1 -0
- package/dist/service/service.api.d.ts +503 -0
- package/dist/service/service.api.d.ts.map +1 -0
- package/dist/service/service.interface.d.ts +36 -9
- package/dist/service/service.interface.d.ts.map +1 -1
- package/dist/shared/http/fetch-retry.d.ts +21 -0
- package/dist/shared/http/fetch-retry.d.ts.map +1 -0
- package/dist/shared/log/create-logger.d.ts +27 -0
- package/dist/shared/log/create-logger.d.ts.map +1 -0
- package/dist/shared/log/enable-log-persist.d.ts +28 -0
- package/dist/shared/log/enable-log-persist.d.ts.map +1 -0
- package/dist/shared/log/index.d.ts +6 -6
- package/dist/shared/log/index.d.ts.map +1 -1
- package/dist/shared/log/log-manager.d.ts +25 -27
- package/dist/shared/log/log-manager.d.ts.map +1 -1
- package/dist/shared/log/log-persist-batch-id.d.ts +13 -0
- package/dist/shared/log/log-persist-batch-id.d.ts.map +1 -0
- package/dist/shared/log/log-persist-flush.d.ts +8 -0
- package/dist/shared/log/log-persist-flush.d.ts.map +1 -0
- package/dist/shared/log/log-persist-hook.d.ts +6 -0
- package/dist/shared/log/log-persist-hook.d.ts.map +1 -0
- package/dist/shared/log/log-persist-logger.d.ts +15 -0
- package/dist/shared/log/log-persist-logger.d.ts.map +1 -0
- package/dist/shared/log/log-persist-registry.d.ts +17 -0
- package/dist/shared/log/log-persist-registry.d.ts.map +1 -0
- package/dist/shared/log/log-persist.config.d.ts +10 -0
- package/dist/shared/log/log-persist.config.d.ts.map +1 -0
- package/dist/shared/log/log-persist.d.ts +55 -0
- package/dist/shared/log/log-persist.d.ts.map +1 -0
- package/dist/shared/log/log-persist.interface.d.ts +116 -0
- package/dist/shared/log/log-persist.interface.d.ts.map +1 -0
- package/dist/shared/log/log-scope.d.ts +25 -18
- package/dist/shared/log/log-scope.d.ts.map +1 -1
- package/dist/shared/utils/fetch-url.d.ts +3 -0
- package/dist/shared/utils/fetch-url.d.ts.map +1 -0
- package/dist/shared/utils/network-error.d.ts +14 -0
- package/dist/shared/utils/network-error.d.ts.map +1 -0
- package/dist/shared/utils/safe-file-name.d.ts +14 -0
- package/dist/shared/utils/safe-file-name.d.ts.map +1 -0
- package/dist/shared/utils/sha256.d.ts +3 -0
- package/dist/shared/utils/sha256.d.ts.map +1 -0
- package/dist/supabase.d.ts +7 -2
- package/dist/supabase.d.ts.map +1 -1
- package/dist/task/index.d.ts +8 -7
- package/dist/task/index.d.ts.map +1 -1
- package/dist/task/local-task-registry.d.ts +1 -1
- package/dist/task/local-task-registry.d.ts.map +1 -1
- package/dist/task/task-manager.d.ts +7 -9
- package/dist/task/task-manager.d.ts.map +1 -1
- package/dist/{node → task}/task-node.d.ts +2 -3
- package/dist/task/task-node.d.ts.map +1 -0
- package/dist/task/task-post-validated.api.d.ts +19 -0
- package/dist/task/task-post-validated.api.d.ts.map +1 -0
- package/dist/task/task-post.api.d.ts +10 -5
- package/dist/task/task-post.api.d.ts.map +1 -1
- package/dist/task/task-queue.d.ts +7 -0
- package/dist/task/task-queue.d.ts.map +1 -0
- package/dist/task/task-repo-context.d.ts.map +1 -1
- package/dist/task/task-repo-validation.d.ts +2 -2
- package/dist/task/task-repo-validation.d.ts.map +1 -1
- package/dist/task/task.api.d.ts +13 -13
- package/dist/task/task.api.d.ts.map +1 -1
- package/dist/task/task.constant.d.ts +4 -0
- package/dist/task/task.constant.d.ts.map +1 -0
- package/dist/task/task.interface.d.ts +1 -1
- package/dist/task/task.interface.d.ts.map +1 -1
- package/dist/trigger/trigger-manager.d.ts +25 -0
- package/dist/trigger/trigger-manager.d.ts.map +1 -0
- package/dist/trigger/trigger-node.d.ts +23 -0
- package/dist/trigger/trigger-node.d.ts.map +1 -0
- package/dist/trigger/trigger.api.d.ts +4 -4
- package/dist/trigger/trigger.api.d.ts.map +1 -1
- package/dist/trigger/trigger.constant.d.ts +8 -0
- package/dist/trigger/trigger.constant.d.ts.map +1 -0
- package/dist/trigger/trigger.interface.d.ts +46 -2
- package/dist/trigger/trigger.interface.d.ts.map +1 -1
- package/dist/word/word.api.d.ts +1 -1
- package/dist/word/word.api.d.ts.map +1 -1
- package/dist/word/word.interface.d.ts +2 -2
- package/dist/word/word.interface.d.ts.map +1 -1
- package/package.json +89 -74
- package/src/browser.ts +144 -79
- package/src/command/command.api.ts +19 -17
- package/src/command/command.interface.ts +2 -3
- package/src/core.api.ts +466 -477
- package/src/core.interface.ts +63 -62
- package/src/core.utils.ts +64 -64
- package/src/idea/idea.interface.ts +3 -3
- package/src/link/link.api.ts +28 -30
- package/src/link/link.interface.ts +3 -4
- package/src/list/list.api.ts +50 -29
- package/src/list/list.interface.ts +3 -4
- package/src/node/env/env-parsers.ts +77 -0
- package/src/node/env/index.ts +10 -0
- package/src/node/env/init-supabase-from-env.ts +38 -0
- package/src/node/env/load-env.ts +67 -0
- package/src/node/env/project-root.ts +34 -0
- package/src/node/env/public-base-url.ts +18 -0
- package/src/node/env/require-env.ts +15 -0
- package/src/node/fs/json-state-store.ts +97 -0
- package/src/node/fs/read-source-file.ts +75 -0
- package/src/node/node-liveness.ts +80 -0
- package/src/node/node-runtime.base.ts +135 -104
- package/src/node/node.api.ts +11 -10
- package/src/node/node.interface.ts +1 -8
- package/src/node/node.utils.ts +1 -1
- package/src/node/preload/run-service-preload.ts +48 -0
- package/src/node/preload/service-preload.interface.ts +14 -0
- package/src/node/process/index.ts +8 -0
- package/src/node/process/managed-child-processes.ts +121 -0
- package/src/node/process/process-spawn.ts +61 -0
- package/src/node/readiness/index.ts +20 -0
- package/src/node/readiness/poll-until.ts +27 -0
- package/src/node/readiness/readiness-checks.ts +79 -0
- package/src/node/readiness/readiness.types.ts +13 -0
- package/src/node/readiness/run-readiness-checks.ts +20 -0
- package/src/node/readiness/service-ready-gate.ts +65 -0
- package/src/node.ts +138 -47
- package/src/parcel/chunk-fetch-registry.ts +96 -0
- package/src/parcel/chunk-url.utils.ts +30 -0
- package/src/parcel/parcel-manager.ts +431 -173
- package/src/parcel/parcel.api.ts +103 -0
- package/src/parcel/parcel.interface.ts +44 -23
- package/src/parcel/parcel.service.ts +79 -0
- package/src/parcel/storage-provider-registry.ts +49 -0
- package/src/parcel/storage-provider.types.ts +45 -0
- package/src/preload.ts +7 -0
- package/src/repo/repo-context.utils.ts +3 -4
- package/src/repo/repo-manager.ts +7 -20
- package/src/repo/repo.api.ts +5 -5
- package/src/repo/repo.interface.ts +1 -2
- package/src/repo/repo.script-loader.ts +4 -8
- package/src/service/base.interface.ts +81 -90
- package/src/service/index.ts +173 -0
- package/src/service/service.api.ts +294 -0
- package/src/service/service.interface.ts +49 -17
- package/src/shared/http/fetch-retry.ts +145 -0
- package/src/shared/log/create-logger.ts +51 -0
- package/src/shared/log/enable-log-persist.ts +225 -0
- package/src/shared/log/index.ts +19 -11
- package/src/shared/log/log-manager.ts +65 -69
- package/src/shared/log/log-persist-batch-id.ts +43 -0
- package/src/shared/log/log-persist-flush.ts +128 -0
- package/src/shared/log/log-persist-hook.ts +13 -0
- package/src/shared/log/log-persist-logger.ts +33 -0
- package/src/shared/log/log-persist-registry.ts +109 -0
- package/src/shared/log/log-persist.config.ts +97 -0
- package/src/shared/log/log-persist.interface.ts +132 -0
- package/src/shared/log/log-persist.ts +704 -0
- package/src/shared/log/log-scope.ts +46 -46
- package/src/shared/utils/config-path.utils.ts +1 -1
- package/src/shared/utils/fetch-url.ts +13 -0
- package/src/shared/utils/network-error.ts +152 -0
- package/src/shared/utils/safe-file-name.ts +37 -0
- package/src/shared/utils/sha256.ts +15 -0
- package/src/supabase.ts +125 -119
- package/src/task/index.ts +31 -34
- package/src/task/local-task-registry.ts +9 -17
- package/src/task/task-manager.ts +34 -35
- package/src/{node → task}/task-node.ts +91 -73
- package/src/task/task-post-validated.api.ts +47 -0
- package/src/task/task-post.api.ts +81 -98
- package/src/task/task-queue.ts +18 -0
- package/src/task/task-repo-context.ts +2 -1
- package/src/task/task-repo-validation.ts +6 -8
- package/src/task/task.api.ts +61 -25
- package/src/task/task.constant.ts +4 -0
- package/src/task/task.interface.ts +4 -7
- package/src/trigger/trigger-manager.ts +287 -0
- package/src/trigger/trigger-node.ts +80 -0
- package/src/trigger/trigger.api.ts +11 -11
- package/src/trigger/trigger.constant.ts +10 -0
- package/src/trigger/trigger.interface.ts +52 -2
- package/src/trigger/trigger.utils.ts +1 -1
- package/src/word/word.api.ts +28 -30
- package/src/word/word.interface.ts +3 -4
- package/dist/auth/auth.api.d.ts +0 -28
- package/dist/auth/auth.api.d.ts.map +0 -1
- package/dist/auth/auth.api.js +0 -51
- package/dist/auth/auth.api.js.map +0 -1
- package/dist/command/command.api.js +0 -58
- package/dist/command/command.api.js.map +0 -1
- package/dist/command/command.interface.js +0 -9
- package/dist/command/command.interface.js.map +0 -1
- package/dist/core.api.js +0 -412
- package/dist/core.api.js.map +0 -1
- package/dist/core.interface.js +0 -46
- package/dist/core.interface.js.map +0 -1
- package/dist/core.utils.js +0 -81
- package/dist/core.utils.js.map +0 -1
- package/dist/feed/feed.interface.d.ts +0 -27
- package/dist/feed/feed.interface.d.ts.map +0 -1
- package/dist/feed/feed.interface.js +0 -17
- package/dist/feed/feed.interface.js.map +0 -1
- package/dist/file/file-manager.d.ts +0 -24
- package/dist/file/file-manager.d.ts.map +0 -1
- package/dist/file/file-manager.js +0 -109
- package/dist/file/file-manager.js.map +0 -1
- package/dist/file/file.api.d.ts +0 -15
- package/dist/file/file.api.d.ts.map +0 -1
- package/dist/file/file.api.js +0 -30
- package/dist/file/file.api.js.map +0 -1
- package/dist/file/file.interface.d.ts +0 -25
- package/dist/file/file.interface.d.ts.map +0 -1
- package/dist/file/file.interface.js +0 -9
- package/dist/file/file.interface.js.map +0 -1
- package/dist/file-list/file-list.api.d.ts +0 -15
- package/dist/file-list/file-list.api.d.ts.map +0 -1
- package/dist/file-list/file-list.api.js +0 -54
- package/dist/file-list/file-list.api.js.map +0 -1
- package/dist/file-list/file-list.interface.d.ts +0 -22
- package/dist/file-list/file-list.interface.d.ts.map +0 -1
- package/dist/file-list/file-list.interface.js +0 -5
- package/dist/file-list/file-list.interface.js.map +0 -1
- package/dist/idea/idea.interface.js +0 -15
- package/dist/idea/idea.interface.js.map +0 -1
- package/dist/index.js +0 -3
- package/dist/index.js.map +0 -1
- package/dist/link/link.api.js +0 -30
- package/dist/link/link.api.js.map +0 -1
- package/dist/link/link.interface.js +0 -7
- package/dist/link/link.interface.js.map +0 -1
- package/dist/list/list.api.js +0 -30
- package/dist/list/list.api.js.map +0 -1
- package/dist/list/list.interface.js +0 -6
- package/dist/list/list.interface.js.map +0 -1
- package/dist/node/node-log-scope.d.ts +0 -11
- package/dist/node/node-log-scope.d.ts.map +0 -1
- package/dist/node/node-log-scope.js +0 -7
- package/dist/node/node-log-scope.js.map +0 -1
- package/dist/node/node-runtime.base.js +0 -397
- package/dist/node/node-runtime.base.js.map +0 -1
- package/dist/node/node-task.preset.d.ts +0 -1
- package/dist/node/node-task.preset.d.ts.map +0 -1
- package/dist/node/node-task.preset.js +0 -14
- package/dist/node/node-task.preset.js.map +0 -1
- package/dist/node/node.api.js +0 -100
- package/dist/node/node.api.js.map +0 -1
- package/dist/node/node.interface.js +0 -19
- package/dist/node/node.interface.js.map +0 -1
- package/dist/node/node.utils.js +0 -36
- package/dist/node/node.utils.js.map +0 -1
- package/dist/node/task-node.d.ts.map +0 -1
- package/dist/node/task-node.js +0 -245
- package/dist/node/task-node.js.map +0 -1
- package/dist/node/trigger-node.d.ts +0 -18
- package/dist/node/trigger-node.d.ts.map +0 -1
- package/dist/node/trigger-node.js +0 -150
- package/dist/node/trigger-node.js.map +0 -1
- package/dist/parcel/parcel-manager.js +0 -156
- package/dist/parcel/parcel-manager.js.map +0 -1
- package/dist/parcel/parcel.interface.js +0 -11
- package/dist/parcel/parcel.interface.js.map +0 -1
- package/dist/question-list/question-list.api.d.ts +0 -13
- package/dist/question-list/question-list.api.d.ts.map +0 -1
- package/dist/question-list/question-list.api.js +0 -35
- package/dist/question-list/question-list.api.js.map +0 -1
- package/dist/question-list/question-list.interface.d.ts +0 -18
- package/dist/question-list/question-list.interface.d.ts.map +0 -1
- package/dist/question-list/question-list.interface.js +0 -5
- package/dist/question-list/question-list.interface.js.map +0 -1
- package/dist/repo/repo-context.utils.js +0 -81
- package/dist/repo/repo-context.utils.js.map +0 -1
- package/dist/repo/repo-manager.js +0 -166
- package/dist/repo/repo-manager.js.map +0 -1
- package/dist/repo/repo.api.js +0 -40
- package/dist/repo/repo.api.js.map +0 -1
- package/dist/repo/repo.interface.js +0 -8
- package/dist/repo/repo.interface.js.map +0 -1
- package/dist/repo/repo.script-loader.js +0 -108
- package/dist/repo/repo.script-loader.js.map +0 -1
- package/dist/review/review.api.d.ts +0 -14
- package/dist/review/review.api.d.ts.map +0 -1
- package/dist/review/review.api.js +0 -133
- package/dist/review/review.api.js.map +0 -1
- package/dist/review/review.interface.d.ts +0 -24
- package/dist/review/review.interface.d.ts.map +0 -1
- package/dist/review/review.interface.js +0 -10
- package/dist/review/review.interface.js.map +0 -1
- package/dist/review-v2/apis/post-review-setting.api.d.ts +0 -12
- package/dist/review-v2/apis/post-review-setting.api.d.ts.map +0 -1
- package/dist/review-v2/apis/post-review-setting.api.js +0 -27
- package/dist/review-v2/apis/post-review-setting.api.js.map +0 -1
- package/dist/review-v2/apis/post-review.api.d.ts +0 -13
- package/dist/review-v2/apis/post-review.api.d.ts.map +0 -1
- package/dist/review-v2/apis/post-review.api.js +0 -46
- package/dist/review-v2/apis/post-review.api.js.map +0 -1
- package/dist/review-v2/review-setting.interface.d.ts +0 -23
- package/dist/review-v2/review-setting.interface.d.ts.map +0 -1
- package/dist/review-v2/review-setting.interface.js +0 -5
- package/dist/review-v2/review-setting.interface.js.map +0 -1
- package/dist/review-v2/review.interface.d.ts +0 -20
- package/dist/review-v2/review.interface.d.ts.map +0 -1
- package/dist/review-v2/review.interface.js +0 -5
- package/dist/review-v2/review.interface.js.map +0 -1
- package/dist/service/api.interface.d.ts +0 -35
- package/dist/service/api.interface.d.ts.map +0 -1
- package/dist/service/api.interface.js +0 -12
- package/dist/service/api.interface.js.map +0 -1
- package/dist/service/base.interface.js +0 -7
- package/dist/service/base.interface.js.map +0 -1
- package/dist/service/service.interface.js +0 -11
- package/dist/service/service.interface.js.map +0 -1
- package/dist/shared/log/create-api-logger.d.ts +0 -21
- package/dist/shared/log/create-api-logger.d.ts.map +0 -1
- package/dist/shared/log/create-api-logger.js +0 -19
- package/dist/shared/log/create-api-logger.js.map +0 -1
- package/dist/shared/log/index.js +0 -10
- package/dist/shared/log/index.js.map +0 -1
- package/dist/shared/log/log-manager.js +0 -237
- package/dist/shared/log/log-manager.js.map +0 -1
- package/dist/shared/log/log-scope.js +0 -70
- package/dist/shared/log/log-scope.js.map +0 -1
- package/dist/shared/utils/config-path.utils.js +0 -85
- package/dist/shared/utils/config-path.utils.js.map +0 -1
- package/dist/shared/utils/error.utils.js +0 -15
- package/dist/shared/utils/error.utils.js.map +0 -1
- package/dist/shared/utils/id.utils.js +0 -5
- package/dist/shared/utils/id.utils.js.map +0 -1
- package/dist/supabase.js +0 -100
- package/dist/supabase.js.map +0 -1
- package/dist/task/index.js +0 -14
- package/dist/task/index.js.map +0 -1
- package/dist/task/local-task-registry.js +0 -214
- package/dist/task/local-task-registry.js.map +0 -1
- package/dist/task/task-manager.js +0 -196
- package/dist/task/task-manager.js.map +0 -1
- package/dist/task/task-post.api.js +0 -91
- package/dist/task/task-post.api.js.map +0 -1
- package/dist/task/task-repo-context.js +0 -12
- package/dist/task/task-repo-context.js.map +0 -1
- package/dist/task/task-repo-validation.js +0 -96
- package/dist/task/task-repo-validation.js.map +0 -1
- package/dist/task/task.api.js +0 -303
- package/dist/task/task.api.js.map +0 -1
- package/dist/task/task.interface.js +0 -36
- package/dist/task/task.interface.js.map +0 -1
- package/dist/task/task.utils.js +0 -2
- package/dist/task/task.utils.js.map +0 -1
- package/dist/trigger/trigger.api.js +0 -125
- package/dist/trigger/trigger.api.js.map +0 -1
- package/dist/trigger/trigger.interface.js +0 -11
- package/dist/trigger/trigger.interface.js.map +0 -1
- package/dist/trigger/trigger.utils.js +0 -39
- package/dist/trigger/trigger.utils.js.map +0 -1
- package/dist/word/word.api.js +0 -30
- package/dist/word/word.api.js.map +0 -1
- package/dist/word/word.interface.js +0 -6
- package/dist/word/word.interface.js.map +0 -1
- package/src/auth/auth.api.ts +0 -87
- package/src/feed/feed.interface.ts +0 -33
- package/src/file/file-manager.ts +0 -145
- package/src/file/file.api.ts +0 -43
- package/src/file/file.interface.ts +0 -30
- package/src/file-list/file-list.api.ts +0 -64
- package/src/file-list/file-list.interface.ts +0 -24
- package/src/node/node-log-scope.ts +0 -15
- package/src/node/node-task.preset.ts +0 -13
- package/src/node/trigger-node.ts +0 -180
- package/src/question-list/question-list.api.ts +0 -42
- package/src/question-list/question-list.interface.ts +0 -21
- package/src/review/review.api.ts +0 -145
- package/src/review/review.interface.ts +0 -26
- package/src/review-v2/apis/post-review-setting.api.ts +0 -35
- package/src/review-v2/apis/post-review.api.ts +0 -59
- package/src/review-v2/review-setting.interface.ts +0 -26
- package/src/review-v2/review.interface.ts +0 -23
- package/src/service/api.interface.ts +0 -47
- package/src/shared/log/create-api-logger.ts +0 -36
package/package.json
CHANGED
|
@@ -1,79 +1,94 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/KyLoc20/target-supabase-sdk.git"
|
|
14
|
-
},
|
|
15
|
-
"type": "module",
|
|
16
|
-
"sideEffects": false,
|
|
17
|
-
"engines": {
|
|
18
|
-
"node": ">=18"
|
|
19
|
-
},
|
|
20
|
-
"packageManager": "pnpm@9.15.0",
|
|
21
|
-
"types": "./dist/browser.d.ts",
|
|
22
|
-
"exports": {
|
|
23
|
-
".": {
|
|
24
|
-
"types": "./dist/browser.d.ts",
|
|
25
|
-
"import": "./dist/browser.js",
|
|
26
|
-
"default": "./dist/browser.js"
|
|
2
|
+
"name": "target-supabase-sdk",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Supabase client initializer and data access APIs",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "KyLoc20",
|
|
7
|
+
"homepage": "https://github.com/KyLoc20/target-supabase-sdk#readme",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://github.com/KyLoc20/target-supabase-sdk/issues"
|
|
27
10
|
},
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"default": "./dist/browser.js"
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/KyLoc20/target-supabase-sdk.git"
|
|
32
14
|
},
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
15
|
+
"type": "module",
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=18"
|
|
19
|
+
},
|
|
20
|
+
"packageManager": "pnpm@9.15.0",
|
|
21
|
+
"types": "./dist/browser.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/browser.d.ts",
|
|
25
|
+
"import": "./dist/browser.js",
|
|
26
|
+
"default": "./dist/browser.js"
|
|
27
|
+
},
|
|
28
|
+
"./browser": {
|
|
29
|
+
"types": "./dist/browser.d.ts",
|
|
30
|
+
"import": "./dist/browser.js",
|
|
31
|
+
"default": "./dist/browser.js"
|
|
32
|
+
},
|
|
33
|
+
"./node": {
|
|
34
|
+
"types": "./dist/node.d.ts",
|
|
35
|
+
"import": "./dist/node.js",
|
|
36
|
+
"default": "./dist/node.js"
|
|
37
|
+
},
|
|
38
|
+
"./preload": {
|
|
39
|
+
"types": "./dist/preload.d.ts",
|
|
40
|
+
"import": "./dist/preload.js",
|
|
41
|
+
"default": "./dist/preload.js"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist",
|
|
46
|
+
"src"
|
|
47
|
+
],
|
|
48
|
+
"scripts": {
|
|
49
|
+
"clean": "node --input-type=module -e \"import fs from 'node:fs'; fs.rmSync('dist', { recursive: true, force: true })\"",
|
|
50
|
+
"build": "pnpm clean && rollup -c && tsc -p tsconfig.dts.json && node scripts/verify-browser-entry.mjs",
|
|
51
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
52
|
+
"typecheck:scripts": "tsc -p tsconfig.scripts.json",
|
|
53
|
+
"format": "biome check --write .",
|
|
54
|
+
"format:check": "biome ci",
|
|
55
|
+
"lint": "biome lint .",
|
|
56
|
+
"worker": "tsx scripts/run-node-worker.ts",
|
|
57
|
+
"worker:trigger": "tsx scripts/run-trigger-node.ts",
|
|
58
|
+
"chrome-sidecar": "tsx scripts/chrome-sidecar-hub.ts",
|
|
59
|
+
"post-task": "tsx scripts/post-task.ts",
|
|
60
|
+
"post-command": "tsx scripts/post-command.ts",
|
|
61
|
+
"post-trigger": "tsx scripts/post-trigger.ts",
|
|
62
|
+
"parcel:split": "tsx scripts/parcel-split-local.ts",
|
|
63
|
+
"parcel:restore": "tsx scripts/parcel-restore-local.ts",
|
|
64
|
+
"dev": "rollup -c --watch",
|
|
65
|
+
"pack:check": "npm pack --dry-run",
|
|
66
|
+
"prepack": "pnpm build"
|
|
67
|
+
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"@supabase/postgrest-js": "^1.19.0",
|
|
70
|
+
"@supabase/supabase-js": "^2.50.0",
|
|
71
|
+
"lodash-es": "^4.17.21",
|
|
72
|
+
"zod": "^3.23.0"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@biomejs/biome": "^2.5.3",
|
|
76
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
77
|
+
"@rollup/plugin-typescript": "^12.1.4",
|
|
78
|
+
"@supabase/postgrest-js": "1.19.4",
|
|
79
|
+
"@supabase/supabase-js": "2.50.3",
|
|
80
|
+
"@types/lodash-es": "^4.17.12",
|
|
81
|
+
"@types/wicg-file-system-access": "^2023.10.7",
|
|
82
|
+
"@types/ws": "^8.18.1",
|
|
83
|
+
"lodash-es": "^4.17.21",
|
|
84
|
+
"rollup": "^4.40.2",
|
|
85
|
+
"tslib": "^2.8.1",
|
|
86
|
+
"tsx": "^4.19.4",
|
|
87
|
+
"typescript": "~5.7.2",
|
|
88
|
+
"ws": "^8.18.0",
|
|
89
|
+
"zod": "^3.24.0"
|
|
90
|
+
},
|
|
91
|
+
"publishConfig": {
|
|
92
|
+
"access": "public"
|
|
37
93
|
}
|
|
38
|
-
},
|
|
39
|
-
"files": [
|
|
40
|
-
"dist",
|
|
41
|
-
"src"
|
|
42
|
-
],
|
|
43
|
-
"scripts": {
|
|
44
|
-
"clean": "node --input-type=module -e \"import fs from 'node:fs'; fs.rmSync('dist', { recursive: true, force: true })\"",
|
|
45
|
-
"build": "pnpm clean && tsc -p tsconfig.build.json && node scripts/verify-browser-entry.mjs",
|
|
46
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
47
|
-
"typecheck:scripts": "tsc -p tsconfig.scripts.json",
|
|
48
|
-
"worker": "tsx scripts/run-node-worker.ts",
|
|
49
|
-
"worker:trigger": "tsx scripts/run-trigger-node.ts",
|
|
50
|
-
"chrome-sidecar": "tsx scripts/chrome-sidecar-hub.ts",
|
|
51
|
-
"post-task": "tsx scripts/post-task.ts",
|
|
52
|
-
"post-command": "tsx scripts/post-command.ts",
|
|
53
|
-
"post-trigger": "tsx scripts/post-trigger.ts",
|
|
54
|
-
"dev": "tsc -p tsconfig.build.json --watch",
|
|
55
|
-
"pack:check": "npm pack --dry-run",
|
|
56
|
-
"prepack": "pnpm build"
|
|
57
|
-
},
|
|
58
|
-
"peerDependencies": {
|
|
59
|
-
"@supabase/postgrest-js": "^1.19.0",
|
|
60
|
-
"@supabase/supabase-js": "^2.50.0",
|
|
61
|
-
"lodash-es": "^4.17.21",
|
|
62
|
-
"zod": "^3.23.0"
|
|
63
|
-
},
|
|
64
|
-
"devDependencies": {
|
|
65
|
-
"@supabase/postgrest-js": "1.19.4",
|
|
66
|
-
"@supabase/supabase-js": "2.50.3",
|
|
67
|
-
"@types/lodash-es": "^4.17.12",
|
|
68
|
-
"@types/ws": "^8.18.1",
|
|
69
|
-
"@types/wicg-file-system-access": "^2023.10.7",
|
|
70
|
-
"lodash-es": "^4.17.21",
|
|
71
|
-
"typescript": "~5.7.2",
|
|
72
|
-
"tsx": "^4.19.4",
|
|
73
|
-
"ws": "^8.18.0",
|
|
74
|
-
"zod": "^3.24.0"
|
|
75
|
-
},
|
|
76
|
-
"publishConfig": {
|
|
77
|
-
"access": "public"
|
|
78
|
-
}
|
|
79
94
|
}
|
package/src/browser.ts
CHANGED
|
@@ -5,96 +5,161 @@
|
|
|
5
5
|
* For TaskManager, RepoManager, TaskNode, use `target-supabase-sdk/node`.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
export { SupabaseInitializer } from "./supabase";
|
|
9
|
-
export type { SupabaseInitializerParams } from "./supabase";
|
|
10
8
|
export type { SupabaseClient } from "@supabase/supabase-js";
|
|
11
|
-
|
|
12
|
-
import { SupabaseInitializer } from "./supabase";
|
|
13
|
-
|
|
14
|
-
export const supabase = SupabaseInitializer.getInstance();
|
|
15
|
-
|
|
16
9
|
export * from "./core.api";
|
|
17
10
|
export * from "./core.interface";
|
|
18
11
|
export * from "./core.utils";
|
|
19
|
-
|
|
20
|
-
export * from "./auth/auth.api";
|
|
21
|
-
|
|
22
|
-
export * from "./feed/feed.interface";
|
|
23
12
|
export * from "./idea/idea.interface";
|
|
24
|
-
|
|
25
|
-
export
|
|
13
|
+
export * from "./link/link.api";
|
|
14
|
+
export * from "./link/link.interface";
|
|
15
|
+
export * from "./list/list.api";
|
|
16
|
+
export * from "./list/list.interface";
|
|
17
|
+
export * from "./node/node.api";
|
|
18
|
+
export * from "./node/node.interface";
|
|
19
|
+
export type {
|
|
20
|
+
EvaluateBusyNodeLivenessOptions,
|
|
21
|
+
TaskNodeLivenessFreshest,
|
|
22
|
+
TaskNodeLivenessReport,
|
|
23
|
+
} from "./node/node-liveness";
|
|
24
|
+
export { evaluateBusyNodeLiveness } from "./node/node-liveness";
|
|
25
|
+
export type { ChunkResolveProvider } from "./parcel/chunk-fetch-registry";
|
|
26
|
+
export {
|
|
27
|
+
installChunkFetchRegistry,
|
|
28
|
+
registerProviderChunkResolver,
|
|
29
|
+
} from "./parcel/chunk-fetch-registry";
|
|
30
|
+
export {
|
|
31
|
+
isLocalFilesystemPath,
|
|
32
|
+
isOpaqueChunkUrl,
|
|
33
|
+
parseProviderPrefixedUrl,
|
|
34
|
+
} from "./parcel/chunk-url.utils";
|
|
35
|
+
export type { DeleteParcelPayload, GetParcelPayload, PostParcelPayload } from "./parcel/parcel.api";
|
|
36
|
+
export {
|
|
37
|
+
deleteParcel,
|
|
38
|
+
deleteParcelSchema,
|
|
39
|
+
getParcel,
|
|
40
|
+
getParcelSchema,
|
|
41
|
+
parcelDetailsSchema,
|
|
42
|
+
postParcel,
|
|
43
|
+
postParcelSchema,
|
|
44
|
+
} from "./parcel/parcel.api";
|
|
26
45
|
export type {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
46
|
+
Chunk,
|
|
47
|
+
Lifecycle as ParcelLifecycle,
|
|
48
|
+
LifecycleStatus as ParcelLifecycleStatus,
|
|
49
|
+
Parcel,
|
|
50
|
+
ParcelCrypto,
|
|
51
|
+
ParcelDetails,
|
|
32
52
|
} from "./parcel/parcel.interface";
|
|
53
|
+
export { CategoryParcel } from "./parcel/parcel.interface";
|
|
54
|
+
export type {
|
|
55
|
+
PublishParcelInput,
|
|
56
|
+
PublishParcelResult,
|
|
57
|
+
RestoreParcelByIdInput,
|
|
58
|
+
RestoreParcelByIdResult,
|
|
59
|
+
} from "./parcel/parcel.service";
|
|
60
|
+
export {
|
|
61
|
+
publishParcel,
|
|
62
|
+
restoreParcel,
|
|
63
|
+
restoreParcelById,
|
|
64
|
+
} from "./parcel/parcel.service";
|
|
65
|
+
export type {
|
|
66
|
+
CreateOptions,
|
|
67
|
+
CreateResult,
|
|
68
|
+
ParcelSaveInput,
|
|
69
|
+
ReassembleOptions,
|
|
70
|
+
StorageAdapter,
|
|
71
|
+
} from "./parcel/parcel-manager";
|
|
33
72
|
export { ParcelManager } from "./parcel/parcel-manager";
|
|
34
|
-
export type { StorageAdapter, ParcelTargetBase } from "./parcel/parcel-manager";
|
|
35
|
-
|
|
36
|
-
export * from "./file/file.interface";
|
|
37
|
-
export * from "./file/file.api";
|
|
38
|
-
export * from "./file/file-manager";
|
|
39
|
-
|
|
40
|
-
export * from "./file-list/file-list.interface";
|
|
41
|
-
export * from "./file-list/file-list.api";
|
|
42
|
-
|
|
43
|
-
export * from "./question-list/question-list.interface";
|
|
44
|
-
export * from "./question-list/question-list.api";
|
|
45
|
-
|
|
46
|
-
export * from "./review/review.interface";
|
|
47
|
-
export * from "./review/review.api";
|
|
48
|
-
|
|
49
73
|
export type {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
74
|
+
CreateUploadAdapterOptions,
|
|
75
|
+
ProviderProbeFail,
|
|
76
|
+
ProviderProbeOk,
|
|
77
|
+
ProviderProbeResult,
|
|
78
|
+
StorageProviderModule,
|
|
79
|
+
UploadTracker,
|
|
80
|
+
} from "./parcel/storage-provider.types";
|
|
81
|
+
export { createUploadTracker } from "./parcel/storage-provider.types";
|
|
82
|
+
export type { ProviderProbeMap, StorageProviderRegistry } from "./parcel/storage-provider-registry";
|
|
83
|
+
export { createStorageProviderRegistry } from "./parcel/storage-provider-registry";
|
|
84
|
+
export * from "./repo/repo.api";
|
|
85
|
+
export * from "./repo/repo.interface";
|
|
86
|
+
export type {
|
|
87
|
+
Api,
|
|
88
|
+
ApiDetails,
|
|
89
|
+
DiscoverServiceInput,
|
|
90
|
+
GetApiPayload,
|
|
91
|
+
GetServicePayload,
|
|
92
|
+
PostApiPayload,
|
|
93
|
+
PostServicePayload,
|
|
94
|
+
Service,
|
|
95
|
+
ServiceDetails,
|
|
96
|
+
} from "./service/index";
|
|
55
97
|
export {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
98
|
+
ApiMethod,
|
|
99
|
+
apiDetailsSchema,
|
|
100
|
+
CategoryService,
|
|
101
|
+
discoverService,
|
|
102
|
+
fieldDefinitionSchema,
|
|
103
|
+
getApi,
|
|
104
|
+
getApiSchema,
|
|
105
|
+
getService,
|
|
106
|
+
getServiceSchema,
|
|
107
|
+
postApi,
|
|
108
|
+
postApiSchema,
|
|
109
|
+
postService,
|
|
110
|
+
postServiceSchema,
|
|
111
|
+
ServiceLifecycleStatus,
|
|
112
|
+
schemaDefinitionSchema,
|
|
113
|
+
serviceDetailsSchema,
|
|
114
|
+
serviceLifecycleSchema,
|
|
115
|
+
} from "./service/index";
|
|
116
|
+
export type { FetchInitFactory, FetchRetryOptions } from "./shared/http/fetch-retry";
|
|
75
117
|
export {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
} from "./
|
|
81
|
-
export type {
|
|
118
|
+
fetchBinaryWithRetry,
|
|
119
|
+
fetchWithRetry,
|
|
120
|
+
isRetryableHttpStatus,
|
|
121
|
+
requestHasBody,
|
|
122
|
+
} from "./shared/http/fetch-retry";
|
|
123
|
+
export type { CreateLoggerInput, LoggerWithScope, LogScope, LogScopePatch } from "./shared/log";
|
|
124
|
+
export { createLogger, LogLevel, logManager } from "./shared/log";
|
|
125
|
+
export { isHttpUrl, resolveFetchUrl } from "./shared/utils/fetch-url";
|
|
126
|
+
export type {
|
|
127
|
+
ClassifiedNetworkError,
|
|
128
|
+
FormatNetworkErrorOptions,
|
|
129
|
+
NetworkErrorKind,
|
|
130
|
+
} from "./shared/utils/network-error";
|
|
82
131
|
export {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
} from "./
|
|
132
|
+
classifyNetworkError,
|
|
133
|
+
formatNetworkError,
|
|
134
|
+
} from "./shared/utils/network-error";
|
|
135
|
+
export type { SanitizeFileNameOptions } from "./shared/utils/safe-file-name";
|
|
136
|
+
export { sanitizeFileName, sanitizeParcelFileName } from "./shared/utils/safe-file-name";
|
|
137
|
+
export { sha256Hex } from "./shared/utils/sha256";
|
|
138
|
+
export type { SupabaseHolder, SupabaseInitializerParams } from "./supabase";
|
|
139
|
+
export { supabase } from "./supabase";
|
|
90
140
|
export type {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
141
|
+
PatchChangeTaskStatusPayload,
|
|
142
|
+
PatchClaimTaskPayload,
|
|
143
|
+
PatchTaskProgressPayload,
|
|
94
144
|
} from "./task/task.api";
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
145
|
+
export {
|
|
146
|
+
patchChangeTaskStatus,
|
|
147
|
+
patchChangeTaskStatusSchema,
|
|
148
|
+
patchClaimTask,
|
|
149
|
+
patchClaimTaskSchema,
|
|
150
|
+
patchTaskProgress,
|
|
151
|
+
patchTaskProgressSchema,
|
|
152
|
+
} from "./task/task.api";
|
|
153
|
+
export type { Task, TaskDetails, TaskFlow } from "./task/task.interface";
|
|
154
|
+
// task — api + enqueue only (TaskManager / postTaskWithValidation → node entry)
|
|
155
|
+
export {
|
|
156
|
+
CategoryTask,
|
|
157
|
+
ResultCode,
|
|
158
|
+
TaskStatus,
|
|
159
|
+
TaskStatusAction,
|
|
160
|
+
} from "./task/task.interface";
|
|
161
|
+
export type { PostTaskPayload } from "./task/task-post.api";
|
|
162
|
+
export { postTask, postTaskSchema } from "./task/task-post.api";
|
|
163
|
+
export type { TaskStatusCount } from "./task/task-queue";
|
|
164
|
+
export { countTasksByType, summarizeTaskQueue } from "./task/task-queue";
|
|
165
|
+
export * from "./word/word.interface";
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createTarget,
|
|
3
|
-
MAX_POLL_TARGET_LIST_SIZE,
|
|
4
|
-
pollTargetList,
|
|
5
|
-
validateWithSchema,
|
|
6
|
-
} from "../core.api";
|
|
7
|
-
import { generateResponse } from "../core.interface";
|
|
8
|
-
import { createApiLogger } from "../shared/log";
|
|
9
1
|
import { z } from "zod";
|
|
10
|
-
import {
|
|
2
|
+
import { createTarget, MAX_POLL_TARGET_LIST_SIZE, pollTargetList, validateWithSchema } from "../core.api";
|
|
3
|
+
import { generateResponse } from "../core.interface";
|
|
4
|
+
import { createLogger } from "../shared/log";
|
|
5
|
+
import { CategoryCommand, type Command, CommandType } from "./command.interface";
|
|
11
6
|
|
|
12
7
|
const nodeIdSchema = z.string().trim().min(1);
|
|
13
8
|
const traceIdSchema = z.string().trim().min(1).optional();
|
|
@@ -41,9 +36,9 @@ function commandNodeFilter(nodeId: string) {
|
|
|
41
36
|
/** Enqueue a control command for `nodeId` (scheduler / admin). */
|
|
42
37
|
export const postCommand = validateWithSchema(
|
|
43
38
|
postCommandSchema,
|
|
44
|
-
"postCommandSchema"
|
|
39
|
+
"postCommandSchema",
|
|
45
40
|
)(async ({ nodeId, command, traceId }) => {
|
|
46
|
-
const logger =
|
|
41
|
+
const logger = createLogger({ module: "postCommand", traceId, labels: { nodeId } });
|
|
47
42
|
|
|
48
43
|
const result = await createTarget<Command, PostCommandPayload>({
|
|
49
44
|
payload: { nodeId, command, traceId },
|
|
@@ -68,9 +63,9 @@ export const postCommand = validateWithSchema(
|
|
|
68
63
|
/** Dequeue control commands for `nodeId` (oldest first). */
|
|
69
64
|
export const getPollCommandList = validateWithSchema(
|
|
70
65
|
getPollCommandListSchema,
|
|
71
|
-
"getPollCommandListSchema"
|
|
66
|
+
"getPollCommandListSchema",
|
|
72
67
|
)(async ({ nodeId, size, traceId }) => {
|
|
73
|
-
const logger =
|
|
68
|
+
const logger = createLogger({ module: "getPollCommandList", traceId, labels: { nodeId } });
|
|
74
69
|
|
|
75
70
|
const { data: dequeuedList = [] } = await pollTargetList<Command>({
|
|
76
71
|
category: CategoryCommand.COMMAND,
|
|
@@ -79,10 +74,17 @@ export const getPollCommandList = validateWithSchema(
|
|
|
79
74
|
ascending: true,
|
|
80
75
|
});
|
|
81
76
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
77
|
+
if (dequeuedList.length === 0) {
|
|
78
|
+
logger.debug("Command", {
|
|
79
|
+
topic: "command",
|
|
80
|
+
data: { nodeId, dequeued: dequeuedList.length },
|
|
81
|
+
});
|
|
82
|
+
} else {
|
|
83
|
+
logger.info("Command", {
|
|
84
|
+
topic: "command",
|
|
85
|
+
data: { nodeId, dequeued: dequeuedList.length },
|
|
86
|
+
});
|
|
87
|
+
}
|
|
86
88
|
|
|
87
89
|
return generateResponse.success(dequeuedList);
|
|
88
90
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Target } from "../core.interface";
|
|
2
|
-
|
|
1
|
+
import type { Target } from "../core.interface";
|
|
3
2
|
|
|
4
3
|
export enum CategoryCommand {
|
|
5
4
|
COMMAND = "command",
|
|
@@ -14,4 +13,4 @@ export interface Command extends Target {
|
|
|
14
13
|
/** Node.id */
|
|
15
14
|
value: string;
|
|
16
15
|
category: CategoryCommand;
|
|
17
|
-
}
|
|
16
|
+
}
|