@powerhousedao/shared 6.0.0-dev.195 → 6.0.0-dev.197
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/clis/index.d.mts +25 -1
- package/dist/clis/index.d.mts.map +1 -1
- package/dist/clis/index.mjs +49 -4
- package/dist/clis/index.mjs.map +1 -1
- package/dist/connect/index.d.ts +240 -715
- package/dist/connect/index.d.ts.map +1 -1
- package/dist/connect/index.js +4 -4
- package/dist/connect/index.js.map +1 -1
- package/dist/document-drive/index.d.ts.map +1 -1
- package/dist/registry/index.d.ts +21 -1
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +17 -1
- package/dist/registry/index.js.map +1 -1
- package/package.json +6 -5
package/dist/clis/index.mjs
CHANGED
|
@@ -3,13 +3,14 @@ import { array, boolean, command, flag, multioption, number, oneOf, option, opti
|
|
|
3
3
|
import { AGENTS, detect, resolveCommand } from "package-manager-detector";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
5
|
import path, { join } from "node:path";
|
|
6
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
6
|
+
import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { esmExternalRequirePlugin } from "rolldown/plugins";
|
|
8
8
|
import chalk from "chalk";
|
|
9
9
|
import fsPromises, { mkdir, stat, writeFile } from "node:fs/promises";
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
11
11
|
import { promisify } from "node:util";
|
|
12
12
|
import { execFile, spawn } from "node:child_process";
|
|
13
|
+
import { isTruthy } from "remeda";
|
|
13
14
|
import npa from "npm-package-arg";
|
|
14
15
|
import { packageDirectory } from "package-directory";
|
|
15
16
|
import { execSync } from "child_process";
|
|
@@ -919,6 +920,31 @@ const serviceArgs = {
|
|
|
919
920
|
...debugArgs
|
|
920
921
|
};
|
|
921
922
|
//#endregion
|
|
923
|
+
//#region clis/args/unpublish.ts
|
|
924
|
+
const unpublishArgs = {
|
|
925
|
+
spec: positional({
|
|
926
|
+
type: optional(string),
|
|
927
|
+
displayName: "package-spec",
|
|
928
|
+
description: "Package to unpublish: `<name>` (whole package) or `<name>@<version>` (single version). If omitted, uses the current project's `name@version` from package.json."
|
|
929
|
+
}),
|
|
930
|
+
registry: option({
|
|
931
|
+
type: optional(string),
|
|
932
|
+
long: "registry",
|
|
933
|
+
description: "Registry URL to unpublish from (overrides config and environment)"
|
|
934
|
+
}),
|
|
935
|
+
yes: flag({
|
|
936
|
+
type: optional(boolean),
|
|
937
|
+
long: "yes",
|
|
938
|
+
short: "y",
|
|
939
|
+
description: "Skip the confirmation prompt"
|
|
940
|
+
}),
|
|
941
|
+
...debugArgs,
|
|
942
|
+
forwardedArgs: rest({
|
|
943
|
+
displayName: "npm-args",
|
|
944
|
+
description: "Extra arguments forwarded to npm unpublish"
|
|
945
|
+
})
|
|
946
|
+
};
|
|
947
|
+
//#endregion
|
|
922
948
|
//#region clis/build-config.ts
|
|
923
949
|
const entry = [
|
|
924
950
|
"index.ts",
|
|
@@ -957,7 +983,9 @@ const nodeNeverBundle = [
|
|
|
957
983
|
"@testing-library/user-event",
|
|
958
984
|
"@types/node",
|
|
959
985
|
"@types/react",
|
|
960
|
-
"@types/react-dom"
|
|
986
|
+
"@types/react-dom",
|
|
987
|
+
"@electric-sql/pglite",
|
|
988
|
+
"@electric-sql/pglite-tools"
|
|
961
989
|
];
|
|
962
990
|
const browserNeverBundle = [...nodeNeverBundle, "@powerhousedao/reactor-api"];
|
|
963
991
|
const copy = [{
|
|
@@ -980,7 +1008,10 @@ const browserBuildConfig = {
|
|
|
980
1008
|
clean: clean$1,
|
|
981
1009
|
dts,
|
|
982
1010
|
sourcemap,
|
|
983
|
-
plugins: esmExternalRequirePlugin({
|
|
1011
|
+
plugins: [esmExternalRequirePlugin({
|
|
1012
|
+
external: reactExternals,
|
|
1013
|
+
skipDuplicateCheck: true
|
|
1014
|
+
})],
|
|
984
1015
|
inputOptions: { experimental: { resolveNewUrlToAsset: true } }
|
|
985
1016
|
};
|
|
986
1017
|
const nodeBuildConfig = {
|
|
@@ -6773,6 +6804,13 @@ async function directoryExists(path) {
|
|
|
6773
6804
|
}
|
|
6774
6805
|
return false;
|
|
6775
6806
|
}
|
|
6807
|
+
function directoryExistsSync(path) {
|
|
6808
|
+
if (!isTruthy(path)) return false;
|
|
6809
|
+
return statSync(path, { throwIfNoEntry: false })?.isDirectory() === true;
|
|
6810
|
+
}
|
|
6811
|
+
function isDirectory(dirent) {
|
|
6812
|
+
return dirent?.isDirectory() === true;
|
|
6813
|
+
}
|
|
6776
6814
|
//#endregion
|
|
6777
6815
|
//#region clis/file-system/file-exists.ts
|
|
6778
6816
|
async function fileExists(path) {
|
|
@@ -6784,6 +6822,13 @@ async function fileExists(path) {
|
|
|
6784
6822
|
}
|
|
6785
6823
|
return false;
|
|
6786
6824
|
}
|
|
6825
|
+
function fileExistsSync(path) {
|
|
6826
|
+
if (!isTruthy(path)) return false;
|
|
6827
|
+
return statSync(path, { throwIfNoEntry: false })?.isFile() === true;
|
|
6828
|
+
}
|
|
6829
|
+
function isFile(dirent) {
|
|
6830
|
+
return dirent?.isFile() === true;
|
|
6831
|
+
}
|
|
6787
6832
|
//#endregion
|
|
6788
6833
|
//#region clis/file-system/package-json.ts
|
|
6789
6834
|
async function getPackageNameFromPackageJson() {
|
|
@@ -7211,6 +7256,6 @@ function assertNodeVersion(nodeVersion = process.versions.node) {
|
|
|
7211
7256
|
if ((0, import_semver.lt)(nodeVersion, "24.0.0")) throw new NodeVersionError(nodeVersion, MINIMUM_NODE_VERSION);
|
|
7212
7257
|
}
|
|
7213
7258
|
//#endregion
|
|
7214
|
-
export { DEFAULT_CONFIG, DEFAULT_CONNECT_OUTDIR, DEFAULT_CONNECT_PREVIEW_PORT, DEFAULT_CONNECT_STUDIO_PORT, DEFAULT_EXPIRY_DAYS, DEFAULT_EXPIRY_SECONDS, DEFAULT_REGISTRY_URL, DEFAULT_RENOWN_URL, DEFAULT_SWITCHBOARD_PORT, DEFAULT_TIMEOUT, DEFAULT_VETRA_CONNECT_PORT, DEFAULT_VETRA_DRIVE_ID, DRIVES_PRESERVE_STRATEGIES, HOME_DIR, LOG_LEVELS, MINIMUM_NODE_VERSION, NodeVersionError, PH_BIN, PH_GLOBAL_DIR_NAME, PH_GLOBAL_PROJECT_NAME, POWERHOUSE_CONFIG_FILE, POWERHOUSE_GLOBAL_DIR, SECONDS_IN_DAY, SERVICE_ACTIONS, VERSIONED_DEPENDENCIES, VERSIONED_DEV_DEPENDENCIES, accessTokenArgs, assertNodeVersion, browserBuildConfig, buildArgs, captureCliError, commonArgs, commonServerArgs, connectArgs, connectBasePath, connectBuildArgs, connectPreviewArgs, connectStudioArgs, debugArgs, defaultDrivesUrl, directoryExists, disableLocalPackages, drivesPreserveStrategy, fetchNpmVersionFromRegistryForTag, fetchPackageVersionFromNpmRegistry, fileExists, force, generateArgs, getConfig, getGlobalPowerhouseProjectDirPath, getLocalPowerhouseProjectDirPath, getPackageManagerAtPowerhouseProjectDirPath, getPackageManagerCommand, getPackageNameFromPackageJson, getPackageVersionFromPackageJson, getPhCliVersionInfo, getPhCmdVersionInfo, getPowerhouseProjectInfo, getPowerhouseProjectInstallCommand, getPowerhouseProjectUninstallCommand, getTagFromVersion, getTelemetryStatus, handleMutuallyExclusiveOptions, https, httpsCertFile, httpsKeyFile, initArgs, initCliTelemetry, inspectArgs, installArgs, isPowerhouseProject, listArgs, localPackage, logLevel, logVersionUpdate, loginArgs, makeDependenciesWithVersions, makeVersionedDependencies, migrateArgs, nodeBuildConfig, packageManagerArgs, packages, parsePackageManager, parsePackageVersion, parseTag, phCliCommandNames, phCliHelpCommands, publishArgs, resolveTelemetryConsent, runCmd, runUseLocal, serviceArgs, setTelemetryConsent, spawnAsync, switchboardArgs, uninstallArgs, vetraArgs, vetraSwitchboardArgs, writeFileEnsuringDir };
|
|
7259
|
+
export { DEFAULT_CONFIG, DEFAULT_CONNECT_OUTDIR, DEFAULT_CONNECT_PREVIEW_PORT, DEFAULT_CONNECT_STUDIO_PORT, DEFAULT_EXPIRY_DAYS, DEFAULT_EXPIRY_SECONDS, DEFAULT_REGISTRY_URL, DEFAULT_RENOWN_URL, DEFAULT_SWITCHBOARD_PORT, DEFAULT_TIMEOUT, DEFAULT_VETRA_CONNECT_PORT, DEFAULT_VETRA_DRIVE_ID, DRIVES_PRESERVE_STRATEGIES, HOME_DIR, LOG_LEVELS, MINIMUM_NODE_VERSION, NodeVersionError, PH_BIN, PH_GLOBAL_DIR_NAME, PH_GLOBAL_PROJECT_NAME, POWERHOUSE_CONFIG_FILE, POWERHOUSE_GLOBAL_DIR, SECONDS_IN_DAY, SERVICE_ACTIONS, VERSIONED_DEPENDENCIES, VERSIONED_DEV_DEPENDENCIES, accessTokenArgs, assertNodeVersion, browserBuildConfig, buildArgs, captureCliError, commonArgs, commonServerArgs, connectArgs, connectBasePath, connectBuildArgs, connectPreviewArgs, connectStudioArgs, debugArgs, defaultDrivesUrl, directoryExists, directoryExistsSync, disableLocalPackages, drivesPreserveStrategy, fetchNpmVersionFromRegistryForTag, fetchPackageVersionFromNpmRegistry, fileExists, fileExistsSync, force, generateArgs, getConfig, getGlobalPowerhouseProjectDirPath, getLocalPowerhouseProjectDirPath, getPackageManagerAtPowerhouseProjectDirPath, getPackageManagerCommand, getPackageNameFromPackageJson, getPackageVersionFromPackageJson, getPhCliVersionInfo, getPhCmdVersionInfo, getPowerhouseProjectInfo, getPowerhouseProjectInstallCommand, getPowerhouseProjectUninstallCommand, getTagFromVersion, getTelemetryStatus, handleMutuallyExclusiveOptions, https, httpsCertFile, httpsKeyFile, initArgs, initCliTelemetry, inspectArgs, installArgs, isDirectory, isFile, isPowerhouseProject, listArgs, localPackage, logLevel, logVersionUpdate, loginArgs, makeDependenciesWithVersions, makeVersionedDependencies, migrateArgs, nodeBuildConfig, packageManagerArgs, packages, parsePackageManager, parsePackageVersion, parseTag, phCliCommandNames, phCliHelpCommands, publishArgs, resolveTelemetryConsent, runCmd, runUseLocal, serviceArgs, setTelemetryConsent, spawnAsync, switchboardArgs, uninstallArgs, unpublishArgs, vetraArgs, vetraSwitchboardArgs, writeFileEnsuringDir };
|
|
7215
7260
|
|
|
7216
7261
|
//# sourceMappingURL=index.mjs.map
|