1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-09 20:13:42 +00:00

[PM-29607] Create @bitwarden/subscription (#17997)

* Create @bitwarden/subscription

* Fix changed import in tsconfig.base.json
This commit is contained in:
Alex Morask
2025-12-16 10:13:18 -06:00
committed by GitHub
parent b1591da1b2
commit a987494300
15 changed files with 123 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
# Subscription
Owned by: billing
Components and services for managing Bitwarden subscriptions.

View File

@@ -0,0 +1,3 @@
import baseConfig from "../../eslint.config.mjs";
export default [...baseConfig];

View File

@@ -0,0 +1,10 @@
module.exports = {
displayName: "subscription",
preset: "../../jest.preset.js",
testEnvironment: "node",
transform: {
"^.+\\.[tj]s$": ["ts-jest", { tsconfig: "<rootDir>/tsconfig.spec.json" }],
},
moduleFileExtensions: ["ts", "js", "html"],
coverageDirectory: "../../coverage/libs/subscription",
};

View File

@@ -0,0 +1,11 @@
{
"name": "@bitwarden/subscription",
"version": "0.0.1",
"description": "Components and services for managing Bitwarden subscriptions.",
"private": true,
"type": "commonjs",
"main": "index.js",
"types": "index.d.ts",
"license": "GPL-3.0",
"author": "billing"
}

View File

@@ -0,0 +1,34 @@
{
"name": "subscription",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/subscription/src",
"projectType": "library",
"tags": [],
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/libs/subscription",
"main": "libs/subscription/src/index.ts",
"tsConfig": "libs/subscription/tsconfig.lib.json",
"assets": ["libs/subscription/*.md"],
"rootDir": "libs/subscription/src"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/subscription/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "libs/subscription/jest.config.js"
}
}
}
}

View File

@@ -0,0 +1 @@
export type Placeholder = unknown;

View File

@@ -0,0 +1,8 @@
import * as lib from "./index";
describe("subscription", () => {
// This test will fail until something is exported from index.ts
it("should work", () => {
expect(lib).toBeDefined();
});
});

View File

@@ -0,0 +1,6 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": ["src/**/*.ts", "src/**/*.js"],
"exclude": ["**/build", "**/dist"]
}

View File

@@ -0,0 +1,13 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}

View File

@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
"include": ["src/**/*.ts"],
"exclude": ["jest.config.js", "src/**/*.spec.ts"]
}

View File

@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"moduleResolution": "node10",
"types": ["jest", "node"]
},
"include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"]
}