sourcegraph/client/shared/package.json

33 lines
1.3 KiB
JSON
Raw Permalink Normal View History

use single root package.json, do not build intermediate shared code (#936) * remove enterprise workspace (build together with webapp) * remove sourcegraph-extension-api workspace * directly import graphqlschema instead of symlinking * remove unneeded symlink (file now lives in this package) * noEmit on extensions-client-common & refer to graphql schema in webapp only * update paths @sourcegraph/extensions-client-common/{lib => src} * remove unneeded workspace for and deps from extensions-client-common * extensions-client-common compiles * update paths in browser-extensions * webapp compiles with ecc node_modules deleted * compiling after adding back ecc node_modules * root gulpfile working * mv packages/webapp -> web * replace "packages/webapp" with "web" * mv packages/browser-extensions client/browser * remove broken phabricator dev script see https://github.com/sourcegraph/sourcegraph/issues/938 * replace "packages/browser-extensions" with "client/browser" * mv packages/extensions-client-common shared * update paths * yarn.lock for browser ext * update paths to graphqlschema * tslint paths * LinkOrSpan * update gql * client/browser typechecks * client/browser tslint * tsconfig.json combining * rearrange gulpfiles * clean up schema gulp tasks * before linking a lot of deps * webpack build working * more consolidation * add more common deps * almost done w browser ext * WIP just tried adding base.config.ts symlinks true to try to fix the issues where multiple highlight.js caused hovers to fail due to no highlighting, and multiple rxjs type errors (codeintellify and sourcegraph/sourcegraph) showing up only in webpack. hypothesis is that this is due to webpack not resolving symlinks and so "seeing" multiple pkgs. * hovers working, fixed resolve issue, just needed to add rxjs to root package.json * regenerate lockfiles * add browser ext to procfile * add back builds * manually sync contribution.schema.json * import schema json files directly, no copying * update import paths * wip typescript build doc * move enterprise/src/ into src/ for ease of typescript build * wip build doc * wip * use a single root package.json * update yarn.lock * prettier * set up .bin symlinks * prettier * all:typecheck * fix * fix all:typecheck * fix schema output path * add back .bin links * fix link * fix gulpfiles * only include gulpfile in root tsconfig * clean up gulpfiles * generate * fix node_modules paths in webpack * sort * simplify tsconfig * ignore generated files * fix bundlesize paths * fix enterprise build * fix tsconfigs * fix back tsconfigs * fix * TMP * fix path * TIP * WIP * transpileonly in tests because we have already typechecked it * fix browser ext test * remove browser ext from procfile for now * fix enterprise paths
2018-11-12 09:05:35 +00:00
{
"private": true,
"name": "@sourcegraph/shared",
"version": "1.0.0",
"license": "Apache-2.0",
use single root package.json, do not build intermediate shared code (#936) * remove enterprise workspace (build together with webapp) * remove sourcegraph-extension-api workspace * directly import graphqlschema instead of symlinking * remove unneeded symlink (file now lives in this package) * noEmit on extensions-client-common & refer to graphql schema in webapp only * update paths @sourcegraph/extensions-client-common/{lib => src} * remove unneeded workspace for and deps from extensions-client-common * extensions-client-common compiles * update paths in browser-extensions * webapp compiles with ecc node_modules deleted * compiling after adding back ecc node_modules * root gulpfile working * mv packages/webapp -> web * replace "packages/webapp" with "web" * mv packages/browser-extensions client/browser * remove broken phabricator dev script see https://github.com/sourcegraph/sourcegraph/issues/938 * replace "packages/browser-extensions" with "client/browser" * mv packages/extensions-client-common shared * update paths * yarn.lock for browser ext * update paths to graphqlschema * tslint paths * LinkOrSpan * update gql * client/browser typechecks * client/browser tslint * tsconfig.json combining * rearrange gulpfiles * clean up schema gulp tasks * before linking a lot of deps * webpack build working * more consolidation * add more common deps * almost done w browser ext * WIP just tried adding base.config.ts symlinks true to try to fix the issues where multiple highlight.js caused hovers to fail due to no highlighting, and multiple rxjs type errors (codeintellify and sourcegraph/sourcegraph) showing up only in webpack. hypothesis is that this is due to webpack not resolving symlinks and so "seeing" multiple pkgs. * hovers working, fixed resolve issue, just needed to add rxjs to root package.json * regenerate lockfiles * add browser ext to procfile * add back builds * manually sync contribution.schema.json * import schema json files directly, no copying * update import paths * wip typescript build doc * move enterprise/src/ into src/ for ease of typescript build * wip build doc * wip * use a single root package.json * update yarn.lock * prettier * set up .bin symlinks * prettier * all:typecheck * fix * fix all:typecheck * fix schema output path * add back .bin links * fix link * fix gulpfiles * only include gulpfile in root tsconfig * clean up gulpfiles * generate * fix node_modules paths in webpack * sort * simplify tsconfig * ignore generated files * fix bundlesize paths * fix enterprise build * fix tsconfigs * fix back tsconfigs * fix * TMP * fix path * TIP * WIP * transpileonly in tests because we have already typechecked it * fix browser ext test * remove browser ext from procfile for now * fix enterprise paths
2018-11-12 09:05:35 +00:00
"scripts": {
"storybook": "STORIES_GLOB='client/shared/src/**/*.story.tsx' pnpm --filter @sourcegraph/storybook run start",
"lint:js": "eslint --cache '**/*.[jt]s?(x)'",
"lint:css": "stylelint 'src/**/*.scss' --quiet",
"test": "vitest",
"build-ts": "tsc --build tsconfig.json --emitDeclarationOnly",
"generate": "concurrently -r npm:generate:*",
"generate:graphql-operations": "ts-node -T dev/generateGraphQlOperations.ts",
"generate:schema": "ts-node -T dev/generateSchema.ts json-schema-draft-07 settings site batch_spec opencodegraph",
"generate:css-modules-types": "ts-node -T dev/generateCssModulesTypes.ts"
},
"devDependencies": {
"@sourcegraph/build-config": "workspace:*",
"@sourcegraph/extension-api-types": "workspace:*",
"@sourcegraph/testing": "workspace:*",
"sourcegraph": "workspace:*"
},
"dependencies": {
"@sourcegraph/client-api": "workspace:*",
"@sourcegraph/codeintellify": "workspace:*",
"@sourcegraph/common": "workspace:*",
"@sourcegraph/http-client": "workspace:*",
"@sourcegraph/telemetry": "^0.16.0",
"@sourcegraph/template-parser": "workspace:*",
"@sourcegraph/wildcard": "workspace:*"
use single root package.json, do not build intermediate shared code (#936) * remove enterprise workspace (build together with webapp) * remove sourcegraph-extension-api workspace * directly import graphqlschema instead of symlinking * remove unneeded symlink (file now lives in this package) * noEmit on extensions-client-common & refer to graphql schema in webapp only * update paths @sourcegraph/extensions-client-common/{lib => src} * remove unneeded workspace for and deps from extensions-client-common * extensions-client-common compiles * update paths in browser-extensions * webapp compiles with ecc node_modules deleted * compiling after adding back ecc node_modules * root gulpfile working * mv packages/webapp -> web * replace "packages/webapp" with "web" * mv packages/browser-extensions client/browser * remove broken phabricator dev script see https://github.com/sourcegraph/sourcegraph/issues/938 * replace "packages/browser-extensions" with "client/browser" * mv packages/extensions-client-common shared * update paths * yarn.lock for browser ext * update paths to graphqlschema * tslint paths * LinkOrSpan * update gql * client/browser typechecks * client/browser tslint * tsconfig.json combining * rearrange gulpfiles * clean up schema gulp tasks * before linking a lot of deps * webpack build working * more consolidation * add more common deps * almost done w browser ext * WIP just tried adding base.config.ts symlinks true to try to fix the issues where multiple highlight.js caused hovers to fail due to no highlighting, and multiple rxjs type errors (codeintellify and sourcegraph/sourcegraph) showing up only in webpack. hypothesis is that this is due to webpack not resolving symlinks and so "seeing" multiple pkgs. * hovers working, fixed resolve issue, just needed to add rxjs to root package.json * regenerate lockfiles * add browser ext to procfile * add back builds * manually sync contribution.schema.json * import schema json files directly, no copying * update import paths * wip typescript build doc * move enterprise/src/ into src/ for ease of typescript build * wip build doc * wip * use a single root package.json * update yarn.lock * prettier * set up .bin symlinks * prettier * all:typecheck * fix * fix all:typecheck * fix schema output path * add back .bin links * fix link * fix gulpfiles * only include gulpfile in root tsconfig * clean up gulpfiles * generate * fix node_modules paths in webpack * sort * simplify tsconfig * ignore generated files * fix bundlesize paths * fix enterprise build * fix tsconfigs * fix back tsconfigs * fix * TMP * fix path * TIP * WIP * transpileonly in tests because we have already typechecked it * fix browser ext test * remove browser ext from procfile for now * fix enterprise paths
2018-11-12 09:05:35 +00:00
},
"sideEffects": true
feat/dotcom: use Enterprise Portal for Cody Gateway usage (#63653) Closes https://linear.app/sourcegraph/issue/CORE-211 See https://linear.app/sourcegraph/issue/CORE-100 for a higher-level view - this is the first proof-of-concept for achieving our migration strategy to extract Enterprise subscription data out of dotcom while retaining the existing UI until a future project ships a dedicated Enterprise Portal UI (https://linear.app/sourcegraph/project/kr-p-enterprise-portal-user-interface-dadd5ff28bd8). The integration uses generated ConnectRPC client code + `react-query`, the latter of which has already been used elsewhere for SSC integrations. This is partly supported by https://github.com/connectrpc/connect-query-es which offers mostly-first-class integration with `react-query`, but I had to do some fenangling to provide the query clients directly as I can't get the React provider thing to work. The ConnectRPC clients point to the proxies introduced in https://github.com/sourcegraph/sourcegraph/pull/63652 which authenticates the requests for Enterprise Portal, until we ship https://linear.app/sourcegraph/project/kr-p1-streamlined-role-assignment-via-sams-and-entitle-2f118b3f9d4c/overview ## Test plan ### Local First, `sg start dotcom` Choose a subscription you have locally. Use `psql -d sourcegraph` to connect to local database, then: ``` sourcegraph=# delete from product_licenses where product_subscription_id = '<local subscription ID>'; DELETE 1 sourcegraph=# update product_subscriptions set id = '58b95c21-c2d0-4b4b-8b15-bf1b926d3557' where id = '<local subscription ID>'; UPDATE 1 ``` Now annoyingly the UI will break because there is no license, we need: ```gql query getGraphQLID { dotcom { productSubscription(uuid:"58b95c21-c2d0-4b4b-8b15-bf1b926d3557") { id # graphQL ID } } } mutation createLicense { dotcom { generateProductLicenseForSubscription(productSubscriptionID:"<graphQLID>", license:{ tags:["dev"] userCount:100 expiresAt:1814815397 }) { id } } } ``` This effectively lets us have a "pretend S2" subscription locally. Visiting the subscription page now at https://sourcegraph.test:3443/site-admin/dotcom/product/subscriptions/58b95c21-c2d0-4b4b-8b15-bf1b926d3557 ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/1e77d77d-8032-436b-ab1d-393b34e8e4b5) The data matches the "real" data currently at https://sourcegraph.com/site-admin/dotcom/product/subscriptions/58b95c21-c2d0-4b4b-8b15-bf1b926d3557 ### Against dotcom ``` sg start web-standalone ``` follow https://www.loom.com/share/6cb3b3ca475b4b9392aa4b11938e76e6?sid=6cd1a689-d75d-4133-bcff-b0c7d25b23f1 and then check out some product subscriptions
2024-07-10 19:22:08 +00:00
}