@bluestep-systems/b6p-core 0.9.0 → 1.0.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/README.md +264 -25
- package/dist/B6PCore.d.ts +7 -0
- package/dist/B6PCore.js +54 -1
- package/dist/B6PCore.js.map +1 -1
- package/dist/B6PUri.d.ts +6 -8
- package/dist/B6PUri.js +6 -8
- package/dist/B6PUri.js.map +1 -1
- package/dist/Err.d.ts +415 -0
- package/dist/Err.js +552 -0
- package/dist/Err.js.map +1 -1
- package/dist/auth/BearerAuthProvider.d.ts +32 -0
- package/dist/auth/BearerAuthProvider.js +49 -0
- package/dist/auth/BearerAuthProvider.js.map +1 -1
- package/dist/cache/OrgCache.js.map +1 -1
- package/dist/cache/ScriptMetaDataStore.js.map +1 -1
- package/dist/constants/ApiEndpoints.d.ts +1 -0
- package/dist/constants/ApiEndpoints.js +1 -0
- package/dist/constants/ApiEndpoints.js.map +1 -1
- package/dist/constants/AuthTypes.js.map +1 -1
- package/dist/constants/BlueHQ.js.map +1 -1
- package/dist/constants/CryptoAlgorithms.js.map +1 -1
- package/dist/constants/ExtensionConfig.js.map +1 -1
- package/dist/constants/FileExtensions.js.map +1 -1
- package/dist/constants/FolderNames.js.map +1 -1
- package/dist/constants/Gateway.d.ts +71 -0
- package/dist/constants/Gateway.js +79 -0
- package/dist/constants/Gateway.js.map +1 -0
- package/dist/constants/GitHubUrls.js.map +1 -1
- package/dist/constants/Http.js.map +1 -1
- package/dist/constants/MimeTypes.js.map +1 -1
- package/dist/constants/Numerical.js.map +1 -1
- package/dist/constants/OutputChannels.js.map +1 -1
- package/dist/constants/SettingsKeys.d.ts +5 -0
- package/dist/constants/SettingsKeys.js +5 -0
- package/dist/constants/SettingsKeys.js.map +1 -1
- package/dist/constants/SpecialFiles.js.map +1 -1
- package/dist/constants/WebDAVElements.js.map +1 -1
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +3 -1
- package/dist/constants/index.js.map +1 -1
- package/dist/data/DownstairsPathParser.js.map +1 -1
- package/dist/data/GlobMatcher.js.map +1 -1
- package/dist/data/IdUtility.js.map +1 -1
- package/dist/data/OrgWorker.js.map +1 -1
- package/dist/data/ScriptKey.js.map +1 -1
- package/dist/data/ScriptUrlParser.js.map +1 -1
- package/dist/data/ServerVersion.d.ts +76 -0
- package/dist/data/ServerVersion.js +111 -0
- package/dist/data/ServerVersion.js.map +1 -0
- package/dist/data/index.d.ts +2 -0
- package/dist/data/index.js +7 -1
- package/dist/data/index.js.map +1 -1
- package/dist/gateway/GatewayClient.d.ts +147 -0
- package/dist/gateway/GatewayClient.js +395 -0
- package/dist/gateway/GatewayClient.js.map +1 -0
- package/dist/gateway/GatewayContext.d.ts +43 -0
- package/dist/gateway/GatewayContext.js +3 -0
- package/dist/gateway/GatewayContext.js.map +1 -0
- package/dist/gateway/GatewayGit.d.ts +291 -0
- package/dist/gateway/GatewayGit.js +731 -0
- package/dist/gateway/GatewayGit.js.map +1 -0
- package/dist/gateway/GatewayKb.d.ts +173 -0
- package/dist/gateway/GatewayKb.js +354 -0
- package/dist/gateway/GatewayKb.js.map +1 -0
- package/dist/gateway/GatewayMarketplace.d.ts +116 -0
- package/dist/gateway/GatewayMarketplace.js +278 -0
- package/dist/gateway/GatewayMarketplace.js.map +1 -0
- package/dist/gateway/GatewayService.d.ts +47 -0
- package/dist/gateway/GatewayService.js +54 -0
- package/dist/gateway/GatewayService.js.map +1 -0
- package/dist/gateway/GatewayToken.d.ts +18 -0
- package/dist/gateway/GatewayToken.js +43 -0
- package/dist/gateway/GatewayToken.js.map +1 -0
- package/dist/gateway/GatewayTokenService.d.ts +101 -0
- package/dist/gateway/GatewayTokenService.js +465 -0
- package/dist/gateway/GatewayTokenService.js.map +1 -0
- package/dist/index.d.ts +24 -9
- package/dist/index.js +33 -7
- package/dist/index.js.map +1 -1
- package/dist/network/HttpClient.js.map +1 -1
- package/dist/network/HttpClientProvider.js.map +1 -1
- package/dist/network/StatusCodes.js.map +1 -1
- package/dist/persistence/PersistablePseudoMap.js.map +1 -1
- package/dist/persistence/PersistenceKeys.js.map +1 -1
- package/dist/persistence/PrivatePersistanceMap.js.map +1 -1
- package/dist/persistence/PseudoMap.js.map +1 -1
- package/dist/persistence/PublicPersistanceMap.js.map +1 -1
- package/dist/persistence/Serializable.js.map +1 -1
- package/dist/persistence/SharedFilePersistence.d.ts +22 -0
- package/dist/persistence/SharedFilePersistence.js +65 -14
- package/dist/persistence/SharedFilePersistence.js.map +1 -1
- package/dist/persistence/TypedMap.js.map +1 -1
- package/dist/persistence/TypedPersistable.js.map +1 -1
- package/dist/persistence/TypedPrivatePersistable.js.map +1 -1
- package/dist/persistence/dirLockdown.js.map +1 -1
- package/dist/providers.d.ts +36 -19
- package/dist/script/GitIdentity.js.map +1 -1
- package/dist/script/GitSync.d.ts +78 -11
- package/dist/script/GitSync.js +84 -17
- package/dist/script/GitSync.js.map +1 -1
- package/dist/script/ScriptContext.d.ts +1 -8
- package/dist/script/ScriptFactory.d.ts +1 -2
- package/dist/script/ScriptFactory.js +1 -2
- package/dist/script/ScriptFactory.js.map +1 -1
- package/dist/script/ScriptFile.js.map +1 -1
- package/dist/script/ScriptFolder.js.map +1 -1
- package/dist/script/ScriptNode.js.map +1 -1
- package/dist/script/ScriptRoot.d.ts +0 -63
- package/dist/script/ScriptRoot.js +0 -178
- package/dist/script/ScriptRoot.js.map +1 -1
- package/dist/script/ScriptService.d.ts +45 -11
- package/dist/script/ScriptService.js +44 -6
- package/dist/script/ScriptService.js.map +1 -1
- package/dist/script/ServerCompile.d.ts +35 -0
- package/dist/script/ServerCompile.js +40 -0
- package/dist/script/ServerCompile.js.map +1 -0
- package/dist/script/TsConfig.d.ts +2 -2
- package/dist/script/TsConfig.js +3 -3
- package/dist/script/TsConfig.js.map +1 -1
- package/dist/script/push.d.ts +117 -77
- package/dist/script/push.js +151 -170
- package/dist/script/push.js.map +1 -1
- package/dist/session/SessionManager.js.map +1 -1
- package/dist/testing/FakeGateway.d.ts +280 -0
- package/dist/testing/FakeGateway.js +627 -0
- package/dist/testing/FakeGateway.js.map +1 -0
- package/dist/testing/MockFileSystem.js.map +1 -1
- package/dist/types.d.ts +332 -0
- package/dist/update/UpdateService.js.map +1 -1
- package/package.json +8 -7
- package/dist/script/ScriptTranspiler.d.ts +0 -183
- package/dist/script/ScriptTranspiler.js +0 -425
- package/dist/script/ScriptTranspiler.js.map +0 -1
- package/dist/script/TsLibResolver.d.ts +0 -60
- package/dist/script/TsLibResolver.js +0 -134
- package/dist/script/TsLibResolver.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MockFileSystem.js","sourceRoot":"","sources":["../../src/testing/MockFileSystem.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"MockFileSystem.js","sourceRoot":"","sources":["../../src/testing/MockFileSystem.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,IAAI,iCAAa;AAC7B,sCAAmC;AAGnC;;;GAGG;AACH;IACU,KAAK,GAAG,IAAI,GAAG,EAA8B,CAAC;IAC9C,KAAK,GAAG,IAAI,GAAG,EAA4B,CAAC;IAEpD;;;;;;;;;;;OAWG;IACK,GAAG,CAAC,GAAW;QACrB,OAAO,eAAM,CAAC,oBAAoB,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrD,CAAC;IAED,qEAAqE;IAErE,WAAW,CAAC,GAAW,EAAE,OAA4B;QACnD,MAAM,MAAM,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC5E,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;QACtC,IAAI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AEhD,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;gBACxC,OAAO,SAAS,CAAC;YACnB,CAAC;YAED,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YAC7C,IAAI,UAAU,KAAK,WAAW,EAAE,CAAC;gBAC/B,MAAM;YACR,CAAC;YAED,WAAW,GAAG,UAAU,CAAC;YACzB,KAAK,EAAE,CAAC;QACV,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oBAAoB,CAAC,MAAc;QACjC,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;YACtB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
|
package/dist/types.d.ts
CHANGED
|
@@ -590,4 +590,336 @@ export type GqlParentNameResp = {
|
|
|
590
590
|
}[];
|
|
591
591
|
};
|
|
592
592
|
};
|
|
593
|
+
/**
|
|
594
|
+
* The `error` codes the gateway puts in an error body, per the b6p gateway contract. A body may
|
|
595
|
+
* carry a code outside this list; {@link Err.GatewayError.code} keeps whatever arrived.
|
|
596
|
+
* @lastreviewed null
|
|
597
|
+
*/
|
|
598
|
+
export type GatewayErrorCode = "token-missing" | "token-invalid" | "scope-missing" | "not-permitted" | "not-found" | "non-fast-forward" | "too-large" | "forge-unavailable" | "scope-escalation" | "alias-taken" | "invalid-request" | "token-limit" | "registry-unavailable";
|
|
599
|
+
/**
|
|
600
|
+
* The JSON body of a gateway error response. On git routes the body is best-effort, so every
|
|
601
|
+
* member may be absent.
|
|
602
|
+
* @lastreviewed null
|
|
603
|
+
*/
|
|
604
|
+
export interface GatewayErrorBody {
|
|
605
|
+
/**
|
|
606
|
+
* One of {@link GatewayErrorCode}, or an unknown code.
|
|
607
|
+
* @lastreviewed null
|
|
608
|
+
*/
|
|
609
|
+
error?: string;
|
|
610
|
+
/**
|
|
611
|
+
* What happened, in the gateway's words.
|
|
612
|
+
* @lastreviewed null
|
|
613
|
+
*/
|
|
614
|
+
message?: string;
|
|
615
|
+
/**
|
|
616
|
+
* The scope the token lacks, present with `scope-missing`; or the scope refused, present with the
|
|
617
|
+
* `403 not-permitted` reason `rewrite-not-permitted` (`kb:rewrite`).
|
|
618
|
+
* @lastreviewed null
|
|
619
|
+
*/
|
|
620
|
+
scope?: string;
|
|
621
|
+
/**
|
|
622
|
+
* The cap the request ran into, when the gateway states it (`token-limit` carries the maximum
|
|
623
|
+
* number of live tokens). Absent otherwise.
|
|
624
|
+
* @lastreviewed null
|
|
625
|
+
*/
|
|
626
|
+
limit?: number;
|
|
627
|
+
/**
|
|
628
|
+
* Why a `403 not-permitted` was refused, when the gateway says: `expiry-exceeds-presenting` (a
|
|
629
|
+
* mint would outlive the presenting token; see {@link presentingExpiresAt}) or
|
|
630
|
+
* `restricted-mints-disabled` (tokens beyond `mcp` cannot be minted yet) or `rewrite-not-permitted`
|
|
631
|
+
* (this account may not hold `kb:rewrite`; see {@link scope}). More values may come. An unknown reason
|
|
632
|
+
* or an off-contract refusal from web-global arrives as `503 registry-unavailable`, never as `400`.
|
|
633
|
+
* @lastreviewed null
|
|
634
|
+
*/
|
|
635
|
+
reason?: string;
|
|
636
|
+
/**
|
|
637
|
+
* With reason `expiry-exceeds-presenting`: when the presenting token expires, ISO 8601.
|
|
638
|
+
* @lastreviewed null
|
|
639
|
+
*/
|
|
640
|
+
presentingExpiresAt?: string;
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* How one listed knowledge base was matched against web's record.
|
|
644
|
+
* - `ok`: the forge repository and web's record agree (every global row is `ok`).
|
|
645
|
+
* - `branch-mismatch`: `liveBranch` is the forge's default branch, which differs from the tenant's setting.
|
|
646
|
+
* - `repo-only`: a forge repository with no web record; the title is the name.
|
|
647
|
+
* - `row-only`: a web record whose forge repository does not exist yet. `gitUrl` is given but a clone answers
|
|
648
|
+
* 404, and `canPush` is false.
|
|
649
|
+
* - `unconfirmed`: the tenant was asked and did not answer; details may be stale.
|
|
650
|
+
* - `undescribed`: no tenant was selected, so web was not asked; the title is the name.
|
|
651
|
+
* - `unknown`: a status newer than this version of core; the server's value is in `rawStatus`.
|
|
652
|
+
* @lastreviewed null
|
|
653
|
+
*/
|
|
654
|
+
export type GatewayKnowledgeBaseStatus = "ok" | "branch-mismatch" | "repo-only" | "row-only" | "unconfirmed" | "undescribed" | "unknown";
|
|
655
|
+
/**
|
|
656
|
+
* One knowledge base the caller may read, as `GET /api/v1/knowledge-bases` lists it.
|
|
657
|
+
* @lastreviewed null
|
|
658
|
+
*/
|
|
659
|
+
export interface GatewayKnowledgeBase {
|
|
660
|
+
/**
|
|
661
|
+
* The tenant's record id (a uuid) when web knows the knowledge base; `null` when there is no record
|
|
662
|
+
* (`repo-only`, `unconfirmed`, `undescribed`). A global row carries web-global's id.
|
|
663
|
+
* @lastreviewed null
|
|
664
|
+
*/
|
|
665
|
+
id: string | null;
|
|
666
|
+
/**
|
|
667
|
+
* How the gateway matched the forge repository with web's record. Every other field of the row keeps
|
|
668
|
+
* its guarantee under every status. See {@link GatewayKnowledgeBaseStatus}.
|
|
669
|
+
* @lastreviewed null
|
|
670
|
+
*/
|
|
671
|
+
status: GatewayKnowledgeBaseStatus;
|
|
672
|
+
/**
|
|
673
|
+
* The status exactly as the server sent it, present only when `status` is `"unknown"` (a value this
|
|
674
|
+
* version of core does not know).
|
|
675
|
+
* @lastreviewed null
|
|
676
|
+
*/
|
|
677
|
+
rawStatus?: string;
|
|
678
|
+
/**
|
|
679
|
+
* The CLI address: `global/<name>` or `tenant/<U…>/<name>`.
|
|
680
|
+
* @lastreviewed null
|
|
681
|
+
*/
|
|
682
|
+
ref: string;
|
|
683
|
+
scope: "global" | "tenant";
|
|
684
|
+
/**
|
|
685
|
+
* The tenant key (`U<seqnum>`) for a tenant KB, `null` for a global one.
|
|
686
|
+
* @lastreviewed null
|
|
687
|
+
*/
|
|
688
|
+
tenant: string | null;
|
|
689
|
+
name: string;
|
|
690
|
+
/**
|
|
691
|
+
* Falls back to the name when the tenant side has no title.
|
|
692
|
+
* @lastreviewed null
|
|
693
|
+
*/
|
|
694
|
+
title: string;
|
|
695
|
+
liveBranch: string;
|
|
696
|
+
/**
|
|
697
|
+
* Whether the caller may push to this knowledge base.
|
|
698
|
+
* @lastreviewed null
|
|
699
|
+
*/
|
|
700
|
+
canPush: boolean;
|
|
701
|
+
/**
|
|
702
|
+
* Absolute smart-HTTP URL. The server owns the layout; the client never builds one.
|
|
703
|
+
* @lastreviewed null
|
|
704
|
+
*/
|
|
705
|
+
gitUrl: string;
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* Body of `GET /api/v1/knowledge-bases`.
|
|
709
|
+
* @lastreviewed null
|
|
710
|
+
*/
|
|
711
|
+
export interface GatewayKnowledgeBaseList {
|
|
712
|
+
knowledgeBases: GatewayKnowledgeBase[];
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* One marketplace repo, as `GET /api/v1/registry/repos` lists it.
|
|
716
|
+
* @lastreviewed null
|
|
717
|
+
*/
|
|
718
|
+
export interface GatewayMarketplaceRepo {
|
|
719
|
+
name: string;
|
|
720
|
+
description: string;
|
|
721
|
+
defaultBranch: string;
|
|
722
|
+
/**
|
|
723
|
+
* The repo's tags in the server's order, which is SemVer 2.0 precedence. The server keeps only the
|
|
724
|
+
* newest 1_000 when a repo has more. The client passes the list through as received: it does not
|
|
725
|
+
* re-sort or truncate it.
|
|
726
|
+
* @lastreviewed null
|
|
727
|
+
*/
|
|
728
|
+
tags: string[];
|
|
729
|
+
/**
|
|
730
|
+
* Absolute smart-HTTP URL. The server owns the layout; the client never builds one.
|
|
731
|
+
* @lastreviewed null
|
|
732
|
+
*/
|
|
733
|
+
gitUrl: string;
|
|
734
|
+
}
|
|
735
|
+
/**
|
|
736
|
+
* Body of `GET /api/v1/registry/repos`.
|
|
737
|
+
* @lastreviewed null
|
|
738
|
+
*/
|
|
739
|
+
export interface GatewayMarketplaceRepoList {
|
|
740
|
+
repos: GatewayMarketplaceRepo[];
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* One of the caller's own access tokens, as `GET /api/v1/tokens` lists it. The secret is never
|
|
744
|
+
* listed.
|
|
745
|
+
* @lastreviewed null
|
|
746
|
+
*/
|
|
747
|
+
export interface GatewayTokenRecord {
|
|
748
|
+
id: string;
|
|
749
|
+
/**
|
|
750
|
+
* Unique among this user's tokens.
|
|
751
|
+
* @lastreviewed null
|
|
752
|
+
*/
|
|
753
|
+
alias: string;
|
|
754
|
+
scopes: string[];
|
|
755
|
+
/**
|
|
756
|
+
* ISO 8601, or `null` for a token minted before the gateway recorded creation times.
|
|
757
|
+
* @lastreviewed null
|
|
758
|
+
*/
|
|
759
|
+
createdAt: string | null;
|
|
760
|
+
/**
|
|
761
|
+
* ISO 8601, or `null` for a token that never expires.
|
|
762
|
+
* @lastreviewed null
|
|
763
|
+
*/
|
|
764
|
+
expiresAt: string | null;
|
|
765
|
+
/**
|
|
766
|
+
* ISO 8601, or `null` when the token has not been used. Approximate: the gateway stamps it at
|
|
767
|
+
* most every 12 hours, so it can trail the real last use by that long.
|
|
768
|
+
* @lastreviewed null
|
|
769
|
+
*/
|
|
770
|
+
lastUsedAt: string | null;
|
|
771
|
+
/**
|
|
772
|
+
* Whether this is the token that made the request (the one b6p has stored).
|
|
773
|
+
* @lastreviewed null
|
|
774
|
+
*/
|
|
775
|
+
current: boolean;
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* Body of `GET /api/v1/tokens`.
|
|
779
|
+
* @lastreviewed null
|
|
780
|
+
*/
|
|
781
|
+
export interface GatewayTokenList {
|
|
782
|
+
tokens: GatewayTokenRecord[];
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* A listed token, as `core.gateway.tokens.list()` returns it. The gateway lists expired tokens too;
|
|
786
|
+
* {@link expired} tells them apart.
|
|
787
|
+
* @lastreviewed null
|
|
788
|
+
*/
|
|
789
|
+
export interface GatewayTokenSummary extends GatewayTokenRecord {
|
|
790
|
+
/**
|
|
791
|
+
* `true` when {@link GatewayTokenRecord.expiresAt} is in the past by this machine's clock at the
|
|
792
|
+
* time of the listing. Derived here, not sent by the gateway.
|
|
793
|
+
* @lastreviewed null
|
|
794
|
+
*/
|
|
795
|
+
expired: boolean;
|
|
796
|
+
/**
|
|
797
|
+
* `true` when {@link GatewayTokenRecord.expiresAt} is `null`.
|
|
798
|
+
* @lastreviewed null
|
|
799
|
+
*/
|
|
800
|
+
neverExpires: boolean;
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* What `core.gateway.tokens.create()` mints.
|
|
804
|
+
* @lastreviewed null
|
|
805
|
+
*/
|
|
806
|
+
export interface GatewayTokenCreateRequest {
|
|
807
|
+
/**
|
|
808
|
+
* Unique among this user's tokens.
|
|
809
|
+
* @lastreviewed null
|
|
810
|
+
*/
|
|
811
|
+
alias: string;
|
|
812
|
+
/**
|
|
813
|
+
* Must be a subset of the presenting token's scopes, or the gateway refuses with `scope-escalation`.
|
|
814
|
+
* @lastreviewed null
|
|
815
|
+
*/
|
|
816
|
+
scopes: readonly string[];
|
|
817
|
+
/**
|
|
818
|
+
* ISO 8601 expiry, sent as given. `null` mints a token that never expires. Left out, the token is
|
|
819
|
+
* minted for 90 days, or until the presenting token expires if that comes first
|
|
820
|
+
* ({@link GatewayCreatedToken.expiryCapped} says when it did): the gateway refuses a token that
|
|
821
|
+
* would outlive the one making the request.
|
|
822
|
+
* @lastreviewed null
|
|
823
|
+
*/
|
|
824
|
+
expiresAt?: string | null;
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Set on a {@link GatewayCreatedToken} when no expiry was asked for and the default 90 days would
|
|
828
|
+
* have outlived the presenting token.
|
|
829
|
+
* @lastreviewed null
|
|
830
|
+
*/
|
|
831
|
+
export interface GatewayExpiryCap {
|
|
832
|
+
/**
|
|
833
|
+
* The expiry the token was minted with: the presenting token's own, ISO 8601.
|
|
834
|
+
* @lastreviewed null
|
|
835
|
+
*/
|
|
836
|
+
cappedTo: string;
|
|
837
|
+
/**
|
|
838
|
+
* What would have applied without the cap.
|
|
839
|
+
* @lastreviewed null
|
|
840
|
+
*/
|
|
841
|
+
requested: "90d";
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* What `core.gateway.tokens.create()` returns: the minted token and whether its default expiry was
|
|
845
|
+
* shortened.
|
|
846
|
+
* @lastreviewed null
|
|
847
|
+
*/
|
|
848
|
+
export interface GatewayCreatedToken extends GatewayMintedToken {
|
|
849
|
+
/**
|
|
850
|
+
* Non-null only when the caller gave no expiry and it was capped at the presenting token's.
|
|
851
|
+
* @lastreviewed null
|
|
852
|
+
*/
|
|
853
|
+
expiryCapped: GatewayExpiryCap | null;
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* Body of `201` from `POST /api/v1/tokens` and `POST /api/v1/tokens/{id}/rotate`. It carries the
|
|
857
|
+
* secret, which the gateway shows only this once.
|
|
858
|
+
* @lastreviewed null
|
|
859
|
+
*/
|
|
860
|
+
export interface GatewayMintedTokenBody {
|
|
861
|
+
id: string;
|
|
862
|
+
/**
|
|
863
|
+
* The `b6pt_…` secret. Not retrievable again.
|
|
864
|
+
* @lastreviewed null
|
|
865
|
+
*/
|
|
866
|
+
token: string;
|
|
867
|
+
alias: string;
|
|
868
|
+
scopes: string[];
|
|
869
|
+
/**
|
|
870
|
+
* ISO 8601, or `null` for a token that never expires.
|
|
871
|
+
* @lastreviewed null
|
|
872
|
+
*/
|
|
873
|
+
expiresAt: string | null;
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* A freshly minted token, secret included. Core never logs it; showing it is the consumer's job.
|
|
877
|
+
* @lastreviewed null
|
|
878
|
+
*/
|
|
879
|
+
export interface GatewayMintedToken extends GatewayMintedTokenBody {
|
|
880
|
+
/**
|
|
881
|
+
* `true` when {@link GatewayMintedTokenBody.expiresAt} is `null`.
|
|
882
|
+
* @lastreviewed null
|
|
883
|
+
*/
|
|
884
|
+
neverExpires: boolean;
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* Result of `core.gateway.tokens.revoke()`.
|
|
888
|
+
* @lastreviewed null
|
|
889
|
+
*/
|
|
890
|
+
export interface GatewayTokenRevokeResult {
|
|
891
|
+
id: string;
|
|
892
|
+
alias: string;
|
|
893
|
+
/**
|
|
894
|
+
* `true` when the revoked token was the one b6p has stored. Core leaves the stored (now dead)
|
|
895
|
+
* token in place; the consumer decides what to do about it.
|
|
896
|
+
* @lastreviewed null
|
|
897
|
+
*/
|
|
898
|
+
revokedCurrent: boolean;
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* Result of `core.gateway.tokens.rotate()`.
|
|
902
|
+
* @lastreviewed null
|
|
903
|
+
*/
|
|
904
|
+
export interface GatewayTokenRotateResult {
|
|
905
|
+
/**
|
|
906
|
+
* The token that was rotated, now revoked.
|
|
907
|
+
* @lastreviewed null
|
|
908
|
+
*/
|
|
909
|
+
replaced: {
|
|
910
|
+
id: string;
|
|
911
|
+
alias: string;
|
|
912
|
+
};
|
|
913
|
+
/**
|
|
914
|
+
* Its replacement: same alias, scopes and absolute end date (`expiresAt`), with a new secret.
|
|
915
|
+
* @lastreviewed null
|
|
916
|
+
*/
|
|
917
|
+
token: GatewayMintedToken;
|
|
918
|
+
/**
|
|
919
|
+
* `true` when the rotated token was the one b6p has stored; the replacement is then stored in
|
|
920
|
+
* its place. (When storing fails, `rotate()` throws `Err.GatewayTokenStoreError` instead.)
|
|
921
|
+
* @lastreviewed null
|
|
922
|
+
*/
|
|
923
|
+
rotatedCurrent: boolean;
|
|
924
|
+
}
|
|
593
925
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateService.js","sourceRoot":"","sources":["../../src/update/UpdateService.ts"],"names":[],"mappings":";;;AAAA,4CAAgE;AAChE,gDAA6C;AAI7C;;;;;GAKG;A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CAAC,cAAc,EAAE,CAAC;QAC1C,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAChD,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC;QACpC,MAAM,UAAU,GAAG,aAAa,KAAK,cAAc,CAAC;QAEpD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,aAAa,sBAAsB,cAAc,EAAE,CAAC,CAAC;QAEzF,IAAI,UAAU,EAAE,CAAC;YACf,wBAAwB;YACxB,MAAM,IAAI,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC;QAC5D,CAAC;QAED,OAAO;YACL,cAAc;YACd,aAAa;YACb,UAAU;SACX,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluestep-systems/b6p-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Core (vscode-free) library for BlueStep B6P script management",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "git+https://github.com/Bluestep-Systems/b6p-core.git"
|
|
9
9
|
},
|
|
10
10
|
"engines": {
|
|
11
|
-
"node": ">=
|
|
11
|
+
"node": ">=24"
|
|
12
12
|
},
|
|
13
13
|
"workspaces": [
|
|
14
14
|
"packages/*"
|
|
@@ -29,16 +29,17 @@
|
|
|
29
29
|
"clean": "rm -rf dist tsconfig.tsbuildinfo && npm run clean -w @bluestep-systems/b6p-core-bsjs-git",
|
|
30
30
|
"format": "prettier --write \"src/**/*.ts\" && npm run format -w @bluestep-systems/b6p-core-bsjs-git",
|
|
31
31
|
"format-check": "prettier --check \"src/**/*.ts\" && npm run format-check -w @bluestep-systems/b6p-core-bsjs-git",
|
|
32
|
-
"test": "npm run compile && npm test -w @bluestep-systems/b6p-core-bsjs-git && node test/B6PUri.test.js && node test/DownstairsPathParser.test.js && node test/
|
|
32
|
+
"test": "npm run compile && npm test -w @bluestep-systems/b6p-core-bsjs-git && node test/B6PUri.test.js && node test/DownstairsPathParser.test.js && node test/AuditIntegrity.test.js && node test/GetSetupUrl.test.js && node test/TsConfigBuildFolder.test.js && node test/JsdocLastReviewed.test.js && node test/PullDivergenceGuard.test.js && node test/ScriptMetaDataStore.test.js && node test/SharedFilePersistence.test.js && node test/OrgCacheReadiness.test.js && node test/BearerAuthProvider.test.js && node test/DestructivePrompts.test.js && node test/GitDraftSync.test.js && node test/ServerVersionFloor.test.js && node test/Gateway.test.js && node test/GatewayGit.test.js && node test/GatewayTokens.test.js && node test/GatewayMarketplace.test.js && node test/GatewayKb.test.js",
|
|
33
33
|
"prepublishOnly": "npm run clean && npm run format-check && npm run check-types && npm run compile"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@bluestep-systems/b6p-core-bsjs-git": "0.
|
|
36
|
+
"@bluestep-systems/b6p-core-bsjs-git": "0.3.1",
|
|
37
37
|
"fast-xml-parser": "^5.10.1",
|
|
38
|
-
"
|
|
38
|
+
"isomorphic-git": "1.44.11"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@types/node": "^
|
|
42
|
-
"prettier": "^3.0.0"
|
|
41
|
+
"@types/node": "^24.19.2",
|
|
42
|
+
"prettier": "^3.0.0",
|
|
43
|
+
"typescript": "7.0.2"
|
|
43
44
|
}
|
|
44
45
|
}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import type { ScriptNode } from "./ScriptNode";
|
|
2
|
-
import type { ScriptRoot } from "./ScriptRoot";
|
|
3
|
-
import type { ScriptContext } from "./ScriptContext";
|
|
4
|
-
/**
|
|
5
|
-
* Outcome of a {@link ScriptTranspiler.transpile} run. `emittedFiles` spans
|
|
6
|
-
* every tsconfig project it compiled; the diagnostic fields do NOT (see below).
|
|
7
|
-
*
|
|
8
|
-
* `diagnosticCount` counts only the diagnostics from the platform-compiled
|
|
9
|
-
* draft-root project (`scripts/*.ts`) — the code whose type-check gates the
|
|
10
|
-
* push; `0` means that code type-checked cleanly. It is **`null`** when the
|
|
11
|
-
* draft-root project was not among the compiled projects (a component whose TS
|
|
12
|
-
* all lives under nested client bundles), i.e. no platform-code type-check ran
|
|
13
|
-
* — distinct from `0`, so a machine consumer never reads "not checked" as
|
|
14
|
-
* "checked clean". Client-bundle diagnostics (nested tsconfigs, e.g. a
|
|
15
|
-
* MergeReport `static/`) are logged advisory and deliberately excluded, since
|
|
16
|
-
* they legitimately reference browser-only globals the component declares
|
|
17
|
-
* nowhere. `diagnosticText` is the formatted list of the same counted
|
|
18
|
-
* diagnostics. Emit is never blocked by diagnostics (the platform runs the
|
|
19
|
-
* emitted JS regardless), so callers use the count to report loudly rather than
|
|
20
|
-
* to abort; a true emit failure throws instead of returning.
|
|
21
|
-
* @lastreviewed null
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* One TypeScript diagnostic, located.
|
|
25
|
-
* @lastreviewed null
|
|
26
|
-
*/
|
|
27
|
-
export interface TypeCheckError {
|
|
28
|
-
file: string;
|
|
29
|
-
line: number;
|
|
30
|
-
column: number;
|
|
31
|
-
code: number;
|
|
32
|
-
message: string;
|
|
33
|
-
}
|
|
34
|
-
export interface TranspileOutcome {
|
|
35
|
-
emittedFiles: string[];
|
|
36
|
-
diagnosticCount: number | null;
|
|
37
|
-
diagnosticText: string;
|
|
38
|
-
/**
|
|
39
|
-
* Whether the build is fully clean (build manifest spec §6): every project wrote its output and none reported an
|
|
40
|
-
* error diagnostic. Only then may a build manifest be written. `uncleanReasons` says why when it is false.
|
|
41
|
-
* @lastreviewed null
|
|
42
|
-
*/
|
|
43
|
-
fullyClean: boolean;
|
|
44
|
-
uncleanReasons: string[];
|
|
45
|
-
/**
|
|
46
|
-
* The diagnostics counted in `diagnosticCount`, one entry each: those of the draft-root project located in the
|
|
47
|
-
* script's own sources (a diagnostic in any `.d.ts` is ignored entirely). `file` is relative to the draft folder,
|
|
48
|
-
* `/`-separated, empty for a diagnostic with no file; `line` and `column` count from 1 (0 with no file).
|
|
49
|
-
* @lastreviewed null
|
|
50
|
-
*/
|
|
51
|
-
typeCheckErrors: TypeCheckError[];
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* What one compiled project reported, as far as build cleanliness goes.
|
|
55
|
-
* @lastreviewed null
|
|
56
|
-
*/
|
|
57
|
-
export interface ProjectBuildReport {
|
|
58
|
-
tsConfigPath: string;
|
|
59
|
-
/**
|
|
60
|
-
* Diagnostics of the error category, of any kind (a type error counts although `noEmitOnError` is off).
|
|
61
|
-
* @lastreviewed null
|
|
62
|
-
*/
|
|
63
|
-
errorCount: number;
|
|
64
|
-
/**
|
|
65
|
-
* Problems with the tsconfig itself (unknown options, file-list errors); the always-empty "no inputs" one is not counted.
|
|
66
|
-
* @lastreviewed null
|
|
67
|
-
*/
|
|
68
|
-
configErrorCount: number;
|
|
69
|
-
emittedFiles: string[];
|
|
70
|
-
/**
|
|
71
|
-
* The project sets `noEmit`.
|
|
72
|
-
* @lastreviewed null
|
|
73
|
-
*/
|
|
74
|
-
noEmit: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* The emit was skipped or withheld.
|
|
77
|
-
* @lastreviewed null
|
|
78
|
-
*/
|
|
79
|
-
emitSkipped: boolean;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Why a build is not fully clean (build manifest spec §6), empty when it is: a project reported an error diagnostic,
|
|
83
|
-
* has a tsconfig with configuration diagnostics, sets `noEmit`, had its emit skipped or withheld, emitted nothing, or
|
|
84
|
-
* wrote output outside the tree.
|
|
85
|
-
* @param draftRoot The draft folder every output must be under; when absent that check is skipped
|
|
86
|
-
* @lastreviewed null
|
|
87
|
-
*/
|
|
88
|
-
export declare function buildUncleanReasons(reports: readonly ProjectBuildReport[], draftRoot?: string): string[];
|
|
89
|
-
/**
|
|
90
|
-
* Compiler for TypeScript files in script projects.
|
|
91
|
-
* Manages compilation of multiple TypeScript files organized by their tsconfig.json files.
|
|
92
|
-
* @lastreviewed 2025-10-01
|
|
93
|
-
*/
|
|
94
|
-
export declare class ScriptTranspiler {
|
|
95
|
-
private readonly ctx;
|
|
96
|
-
private projects;
|
|
97
|
-
private static DEFAULT_TS_CONFIG;
|
|
98
|
-
constructor(ctx: ScriptContext);
|
|
99
|
-
private getDefaultOptions;
|
|
100
|
-
private getProjectConfig;
|
|
101
|
-
/**
|
|
102
|
-
* Resolve the ambient declaration files (`*.d.ts`) a tsconfig pulls in via its
|
|
103
|
-
* `include`/`files`. These carry the platform globals — `B`, `console`, the
|
|
104
|
-
* generated `MEFR_*`/`Record_*` types, the `Bluestep` namespace, imported
|
|
105
|
-
* query globals — declared in the component's sibling `declarations/` tree
|
|
106
|
-
* (a real draft tsconfig's `include` starts with `../declarations/index.d.ts`).
|
|
107
|
-
*
|
|
108
|
-
* The transpile builds its own root-file list by walking the `draft/` folder
|
|
109
|
-
* and parses the tsconfig with `readDirectory: () => []`, so the tsconfig's
|
|
110
|
-
* `include` — which points OUTSIDE `draft/` — is otherwise dropped. That left
|
|
111
|
-
* every platform global an unresolved "Cannot find name" and reduced the only
|
|
112
|
-
* pre-publish type-check to a syntax check, so a push shipped un-type-checked
|
|
113
|
-
* JavaScript while reporting success (ClickUp 86bbeb659). Ambient `.d.ts`
|
|
114
|
-
* emit no JavaScript, so adding them to the program's root files fixes the
|
|
115
|
-
* type-check without changing the emitted-file set — the same effect as a
|
|
116
|
-
* hand-written `/// <reference path="../../declarations/index.d.ts" />`.
|
|
117
|
-
*
|
|
118
|
-
* Resolution uses the real `ts.sys` (not the stubbed `readDirectory`) so
|
|
119
|
-
* globbed includes resolve, then keeps only existing `.d.ts` so a stale
|
|
120
|
-
* include entry cannot itself introduce a "file not found" diagnostic.
|
|
121
|
-
* @lastreviewed null
|
|
122
|
-
*/
|
|
123
|
-
static resolveDeclarationRootFiles(tsConfigPath: string, configJson: object): string[];
|
|
124
|
-
/**
|
|
125
|
-
* Whether a path is an ambient declaration file — matched broadly enough
|
|
126
|
-
* (`.d.ts`, `.d.mts`, `.d.cts`) that a future switch to a module-flavored
|
|
127
|
-
* declaration name cannot silently drop the platform globals and regress the
|
|
128
|
-
* type-check back to syntax-only.
|
|
129
|
-
* @lastreviewed null
|
|
130
|
-
*/
|
|
131
|
-
private static isDeclarationFile;
|
|
132
|
-
/**
|
|
133
|
-
* Force the invariants this transpile step depends on onto a set of parsed
|
|
134
|
-
* compiler options, regardless of what the project's tsconfig.json specified.
|
|
135
|
-
*
|
|
136
|
-
* - `listEmittedFiles`: we return the emitted paths to the caller.
|
|
137
|
-
* - `skipLibCheck`: this step is a transpile/emit gate, not a full lib audit.
|
|
138
|
-
* Without it, a legitimate project `lib: ["dom", "WebWorker"]` (e.g. a
|
|
139
|
-
* MergeReport `static/` client bundle) produces 30+ lib-vs-lib conflicts
|
|
140
|
-
* (`ImportExportKind`, duplicate index signatures, `location` mismatch, ...)
|
|
141
|
-
* that have nothing to do with the project's own code.
|
|
142
|
-
* - `noEmitOnError`: emit must succeed even when type diagnostics exist —
|
|
143
|
-
* the platform never type-checks (it runs the emitted JS on GraalVM) and a
|
|
144
|
-
* component's local declarations may be incomplete, so a diagnostic must not
|
|
145
|
-
* block the emit a push depends on. This is NOT the same as swallowing the
|
|
146
|
-
* diagnostics: `transpile` returns their count so the push surfaces them
|
|
147
|
-
* loudly instead of reporting a clean success (ClickUp 86bbeb659).
|
|
148
|
-
* @lastreviewed null
|
|
149
|
-
*/
|
|
150
|
-
private static applyTranspileInvariants;
|
|
151
|
-
addFile(sn: ScriptNode): Promise<void>;
|
|
152
|
-
transpile(sharedRoot?: ScriptRoot): Promise<TranspileOutcome>;
|
|
153
|
-
/**
|
|
154
|
-
* Build the `ts.Program` for one tsconfig project and emit it, returning the
|
|
155
|
-
* emitted files and the combined pre-emit + emit diagnostics.
|
|
156
|
-
*
|
|
157
|
-
* The declaration files come FIRST so the type-check resolves platform
|
|
158
|
-
* globals; ambient `.d.ts` emit nothing, so adding them changes only what is
|
|
159
|
-
* type-checked, not the emitted-file set (the invariant the regression test
|
|
160
|
-
* pins). The `Set` dedupes only exact string matches — declaration paths come
|
|
161
|
-
* from `ts.sys` (forward slashes) and `sfPaths` from `B6PUri` (native
|
|
162
|
-
* separators), so on Windows a `.d.ts` also under the draft tree may appear
|
|
163
|
-
* twice; harmless (TypeScript canonicalizes internally, and a `.d.ts` still
|
|
164
|
-
* emits nothing), just not deduped here.
|
|
165
|
-
* @lastreviewed null
|
|
166
|
-
*/
|
|
167
|
-
private compileProject;
|
|
168
|
-
/**
|
|
169
|
-
* Create a `ts.Program` with a `CompilerHost` whose default-library resolution
|
|
170
|
-
* does NOT depend on `__filename`.
|
|
171
|
-
*
|
|
172
|
-
* b6p-core is bundled into the consumer's single-file CLI / SEA binary, so
|
|
173
|
-
* TypeScript's default `getDefaultLibLocation()` (= `dirname(__filename)`)
|
|
174
|
-
* points at the bundle directory, where no `lib.*.d.ts` exist. We resolve the
|
|
175
|
-
* lib directory via {@link TsLibResolver} and override the two host methods
|
|
176
|
-
* that steer lib lookup. If no lib directory can be found we fall back to the
|
|
177
|
-
* default host behavior rather than pointing it at a bogus path.
|
|
178
|
-
* @lastreviewed null
|
|
179
|
-
*/
|
|
180
|
-
private createProgram;
|
|
181
|
-
private locate;
|
|
182
|
-
private formatDiagnostics;
|
|
183
|
-
}
|