fix: Bringing in a building for the browser

This commit is contained in:
J H
2024-03-25 11:07:59 -06:00
parent 18cc5e0ee8
commit 4ab7300376
6 changed files with 55 additions and 19 deletions

14
sdk/lib/index.browser.ts Normal file
View File

@@ -0,0 +1,14 @@
export { EmVer } from "./emverLite/mod"
export { setupManifest } from "./manifest/setupManifest"
export { setupExposeStore } from "./store/setupExposeStore"
export * as config from "./config"
export * as CB from "./config/builder"
export * as CT from "./config/configTypes"
export * as dependencyConfig from "./dependencyConfig"
export * as manifest from "./manifest"
export * as types from "./types"
export * as T from "./types"
export * as yaml from "yaml"
export * as matches from "ts-matches"
export * as util from "./util/index.browser"

View File

@@ -5,6 +5,7 @@ export { StartSdk } from "./StartSdk"
export { setupManifest } from "./manifest/setupManifest"
export { FileHelper } from "./util/fileHelper"
export { setupExposeStore } from "./store/setupExposeStore"
export { pathBuilder } from "./store/PathBuilder"
export * as actions from "./actions"
export * as backup from "./backup"
export * as config from "./config"

View File

@@ -0,0 +1,25 @@
import * as T from "../types"
export { GetServiceInterface, getServiceInterface } from "./getServiceInterface"
export { getServiceInterfaces } from "./getServiceInterfaces"
// prettier-ignore
export type FlattenIntersection<T> =
T extends ArrayLike<any> ? T :
T extends object ? {} & {[P in keyof T]: T[P]} :
T;
export type _<T> = FlattenIntersection<T>
export const isKnownError = (e: unknown): e is T.KnownError =>
e instanceof Object && ("error" in e || "error-code" in e)
declare const affine: unique symbol
export type Affine<A> = { [affine]: A }
type NeverPossible = { [affine]: string }
export type NoAny<A> = NeverPossible extends A
? keyof NeverPossible extends keyof A
? never
: A
: A

12
sdk/package-lock.json generated
View File

@@ -9,19 +9,19 @@
"version": "0.4.0-rev0.lib0.rc8.beta10",
"license": "MIT",
"dependencies": {
"@iarna/toml": "^2.2.5",
"isomorphic-fetch": "^3.0.0",
"ts-matches": "^5.4.1",
"yaml": "^2.2.2"
"ts-matches": "^5.4.1"
},
"devDependencies": {
"@iarna/toml": "^2.2.5",
"@types/jest": "^29.4.0",
"jest": "^29.4.3",
"prettier": "^3.2.5",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"tsx": "^4.7.1",
"typescript": "^5.0.4"
"typescript": "^5.0.4",
"yaml": "^2.2.2"
}
},
"node_modules/@ampproject/remapping": {
@@ -651,7 +651,8 @@
"node_modules/@iarna/toml": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz",
"integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg=="
"integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==",
"dev": true
},
"node_modules/@istanbuljs/load-nyc-config": {
"version": "1.1.0",
@@ -4235,6 +4236,7 @@
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.2.tgz",
"integrity": "sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==",
"dev": true,
"engines": {
"node": ">= 14"
}

View File

@@ -5,14 +5,8 @@
"main": "./cjs/sdk/lib/index.js",
"types": "./cjs/sdk/lib/index.d.ts",
"module": "./mjs/sdk/lib/index.js",
"browser": "./mjs/sdk/lib/index.browser.js",
"sideEffects": true,
"exports": {
".": {
"import": "./mjs/sdk/lib/index.js",
"require": "./cjs/sdk/lib/index.js",
"types": "./cjs/sdk/lib/index.d.ts"
}
},
"typesVersion": {
">=3.1": {
"*": [
@@ -36,10 +30,8 @@
},
"homepage": "https://github.com/Start9Labs/start-sdk#readme",
"dependencies": {
"@iarna/toml": "^2.2.5",
"isomorphic-fetch": "^3.0.0",
"ts-matches": "^5.4.1",
"yaml": "^2.2.2"
"ts-matches": "^5.4.1"
},
"prettier": {
"trailingComma": "all",
@@ -48,6 +40,8 @@
"singleQuote": false
},
"devDependencies": {
"@iarna/toml": "^2.2.5",
"yaml": "^2.2.2",
"@types/jest": "^29.4.0",
"jest": "^29.4.3",
"prettier": "^3.2.5",

8
web/package-lock.json generated
View File

@@ -1982,19 +1982,19 @@
"version": "0.4.0-rev0.lib0.rc8.beta10",
"license": "MIT",
"dependencies": {
"@iarna/toml": "^2.2.5",
"isomorphic-fetch": "^3.0.0",
"ts-matches": "^5.4.1",
"yaml": "^2.2.2"
"ts-matches": "^5.4.1"
},
"devDependencies": {
"@iarna/toml": "^2.2.5",
"@types/jest": "^29.4.0",
"jest": "^29.4.3",
"prettier": "^3.2.5",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"tsx": "^4.7.1",
"typescript": "^5.0.4"
"typescript": "^5.0.4",
"yaml": "^2.2.2"
}
},
"node_modules/@ampproject/remapping": {