Skip to content

Commit

Permalink
fix: move lib to src and dist to lib for backwards-compatibility (#903)
Browse files Browse the repository at this point in the history
  • Loading branch information
childish-sambino committed Jan 27, 2023
1 parent ccbb504 commit b41f395
Show file tree
Hide file tree
Showing 613 changed files with 44 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -31,4 +31,4 @@ yarn.lock
package-lock.json

**/.openapi-generator*
dist
lib
2 changes: 1 addition & 1 deletion .jshintignore
@@ -1,3 +1,3 @@
spec/integration/**
lib/**/*.d.ts
lib/**/*
index.d.ts
2 changes: 1 addition & 1 deletion .nycrc.json
@@ -1,6 +1,6 @@
{
"exclude": [
"lib/rest/**/*.js",
"src/rest/**/*.js",
"**/*.spec.js"
],
"reporter": [
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
@@ -1,6 +1,6 @@
.github
coverage
dist
lib
docs

babel.config.js
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Expand Up @@ -5,10 +5,10 @@ WORKDIR /twilio

ENV NODE_PATH /usr/local/lib/node_modules

COPY lib ./lib
COPY src ./src
COPY spec ./spec
COPY examples ./examples
COPY index.ts package.json babel.config.js tsconfig.json ./
COPY index.* package.json babel.config.js tsconfig.json ./

RUN npm config set unsafe-perm true # Needed to run prepublish as root.

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -15,7 +15,7 @@ docs:
npm run typedoc

clean:
rm -rf node_modules dist
rm -rf node_modules lib

prettier:
npm run prettier
Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions index.js
@@ -0,0 +1,9 @@
"use strict";
var __importDefault =
(this && this.__importDefault) ||
function (mod) {
return mod && mod.__esModule ? mod : { default: mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const lib_1 = __importDefault(require("./lib"));
exports.default = lib_1.default;
14 changes: 7 additions & 7 deletions package.json
Expand Up @@ -55,24 +55,24 @@
"test": "npm run test:javascript && npm run test:typescript",
"test:javascript": "jest spec/* --coverage --detectOpenHandles",
"test:typescript": "tsc --noEmit",
"jshint": "jshint lib/rest/** lib/base/** lib/http/**",
"jscs": "eslint lib/base/**/**.js lib/http/**/**.js --fix",
"jshint": "jshint src/rest/** src/base/** src/http/**",
"jscs": "eslint src/base/**/**.js src/http/**/**.js --fix",
"prepublish": "npm run build",
"build": "tsc && cp package.json dist/",
"build": "tsc",
"check": "npm run jshint && npm run jscs",
"ci": "npm run test && npm run nsp && npm run prettier-check",
"nsp": "npm audit --production",
"prettier": "prettier --write .",
"prettier-check": "prettier --check .",
"cluster": "jest ./cluster_test.spec.ts --coverage",
"webhook-test": "jest ./webhook_cluster_test.spec.ts --coverage",
"typedoc": "typedoc --entryPointStrategy expand lib --out docs --logLevel Error"
"typedoc": "typedoc --entryPointStrategy expand src --out docs --logLevel Error"
},
"files": [
"dist"
"list"
],
"main": "./dist/lib",
"types": "./dist/index.d.ts",
"main": "./lib",
"types": "./index.d.ts",
"engines": {
"node": ">=14.0"
},
Expand Down
4 changes: 2 additions & 2 deletions sonar-project.properties
Expand Up @@ -2,8 +2,8 @@ sonar.projectKey=twilio_twilio-node
sonar.projectName=twilio-node
sonar.organization=twilio

sonar.sources=lib
sonar.exclusions=lib/rest/**/*.*,lib/twiml/*Response.ts
sonar.sources=src
sonar.exclusions=src/rest/**/*.*,lib/twiml/*Response.ts
sonar.tests=spec

# For Code Coverage analysis
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -19,7 +19,7 @@ import V2010 from "../../../V2010";
const deserialize = require("../../../../../base/deserialize");
const serialize = require("../../../../../base/serialize");
import { isValidPathParam } from "../../../../../base/utility";
import { PhoneNumberCapabilities } from "../../../../../../lib/interfaces";
import { PhoneNumberCapabilities } from "../../../../../../src/interfaces";

/**
* Options to pass to each
Expand Down
Expand Up @@ -19,7 +19,7 @@ import V2010 from "../../../V2010";
const deserialize = require("../../../../../base/deserialize");
const serialize = require("../../../../../base/serialize");
import { isValidPathParam } from "../../../../../base/utility";
import { PhoneNumberCapabilities } from "../../../../../../lib/interfaces";
import { PhoneNumberCapabilities } from "../../../../../../src/interfaces";

/**
* Options to pass to each
Expand Down
Expand Up @@ -19,7 +19,7 @@ import V2010 from "../../../V2010";
const deserialize = require("../../../../../base/deserialize");
const serialize = require("../../../../../base/serialize");
import { isValidPathParam } from "../../../../../base/utility";
import { PhoneNumberCapabilities } from "../../../../../../lib/interfaces";
import { PhoneNumberCapabilities } from "../../../../../../src/interfaces";

/**
* Options to pass to each
Expand Down
Expand Up @@ -19,7 +19,7 @@ import V2010 from "../../../V2010";
const deserialize = require("../../../../../base/deserialize");
const serialize = require("../../../../../base/serialize");
import { isValidPathParam } from "../../../../../base/utility";
import { PhoneNumberCapabilities } from "../../../../../../lib/interfaces";
import { PhoneNumberCapabilities } from "../../../../../../src/interfaces";

/**
* Options to pass to each
Expand Down
Expand Up @@ -19,7 +19,7 @@ import V2010 from "../../../V2010";
const deserialize = require("../../../../../base/deserialize");
const serialize = require("../../../../../base/serialize");
import { isValidPathParam } from "../../../../../base/utility";
import { PhoneNumberCapabilities } from "../../../../../../lib/interfaces";
import { PhoneNumberCapabilities } from "../../../../../../src/interfaces";

/**
* Options to pass to each
Expand Down
Expand Up @@ -19,7 +19,7 @@ import V2010 from "../../../V2010";
const deserialize = require("../../../../../base/deserialize");
const serialize = require("../../../../../base/serialize");
import { isValidPathParam } from "../../../../../base/utility";
import { PhoneNumberCapabilities } from "../../../../../../lib/interfaces";
import { PhoneNumberCapabilities } from "../../../../../../src/interfaces";

/**
* Options to pass to each
Expand Down
Expand Up @@ -19,7 +19,7 @@ import V2010 from "../../../V2010";
const deserialize = require("../../../../../base/deserialize");
const serialize = require("../../../../../base/serialize");
import { isValidPathParam } from "../../../../../base/utility";
import { PhoneNumberCapabilities } from "../../../../../../lib/interfaces";
import { PhoneNumberCapabilities } from "../../../../../../src/interfaces";

/**
* Options to pass to each
Expand Down
File renamed without changes.
Expand Up @@ -29,7 +29,7 @@ import { SiprecListInstance } from "./call/siprec";
import { StreamListInstance } from "./call/stream";
import { UserDefinedMessageListInstance } from "./call/userDefinedMessage";
import { UserDefinedMessageSubscriptionListInstance } from "./call/userDefinedMessageSubscription";
import TwiML from "../../../../../lib/twiml/TwiML";
import TwiML from "../../../../../src/twiml/TwiML";

type CallStatus =
| "queued"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -23,7 +23,7 @@ import { AssignedAddOnListInstance } from "./incomingPhoneNumber/assignedAddOn";
import { LocalListInstance } from "./incomingPhoneNumber/local";
import { MobileListInstance } from "./incomingPhoneNumber/mobile";
import { TollFreeListInstance } from "./incomingPhoneNumber/tollFree";
import { PhoneNumberCapabilities } from "../../../../../lib/interfaces";
import { PhoneNumberCapabilities } from "../../../../../src/interfaces";

type IncomingPhoneNumberAddressRequirement =
| "none"
Expand Down
Expand Up @@ -19,7 +19,7 @@ import V2010 from "../../../V2010";
const deserialize = require("../../../../../base/deserialize");
const serialize = require("../../../../../base/serialize");
import { isValidPathParam } from "../../../../../base/utility";
import { PhoneNumberCapabilities } from "../../../../../../lib/interfaces";
import { PhoneNumberCapabilities } from "../../../../../../src/interfaces";

type IncomingPhoneNumberLocalAddressRequirement =
| "none"
Expand Down
Expand Up @@ -19,7 +19,7 @@ import V2010 from "../../../V2010";
const deserialize = require("../../../../../base/deserialize");
const serialize = require("../../../../../base/serialize");
import { isValidPathParam } from "../../../../../base/utility";
import { PhoneNumberCapabilities } from "../../../../../../lib/interfaces";
import { PhoneNumberCapabilities } from "../../../../../../src/interfaces";

type IncomingPhoneNumberMobileAddressRequirement =
| "none"
Expand Down
Expand Up @@ -19,7 +19,7 @@ import V2010 from "../../../V2010";
const deserialize = require("../../../../../base/deserialize");
const serialize = require("../../../../../base/serialize");
import { isValidPathParam } from "../../../../../base/utility";
import { PhoneNumberCapabilities } from "../../../../../../lib/interfaces";
import { PhoneNumberCapabilities } from "../../../../../../src/interfaces";

type IncomingPhoneNumberTollFreeAddressRequirement =
| "none"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b41f395

Please sign in to comment.