Skip to content

Commit

Permalink
feat: restructure directories
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Zuev committed Dec 15, 2021
1 parent 4e90a92 commit 55bf685
Show file tree
Hide file tree
Showing 69 changed files with 81 additions and 79 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/contrib/**
2 changes: 1 addition & 1 deletion examples/ai_translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const run = require('./').run;
const {
TranslationService,
TranslateRequest,
} = require('../api/ai/translate/v2');
} = require('../src/api/ai/translate/v2');

run(async (session, _, folderId) => {
const translationService = new TranslationService(session);
Expand Down
4 changes: 2 additions & 2 deletions examples/compute_instance_create.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const run = require('./').run;
const { NetworkService } = require('../api/vpc/v1');
const { NetworkService } = require('../src/api/vpc/v1');
const {
ImageService,
InstanceService,
IpVersion,
} = require('../api/compute/v1');
} = require('../src/api/compute/v1');

const TARGET_ZONE_ID = 'ru-central1-a';

Expand Down
2 changes: 1 addition & 1 deletion examples/docapi.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const run = require('./').run;
const { DocAPIService } = require('../lib/slydb/docapi/docapi.js');
const { DocAPIService } = require('../src/lib/slydb/docapi/docapi.js');

run(async (session, _, folderId) => {
var endpoint =
Expand Down
2 changes: 1 addition & 1 deletion examples/functions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const run = require('./').run;
const { InvokeService } = require('../lib/serverless/functions/v1/invoke');
const { InvokeService } = require('../src/lib/serverless/functions/v1/invoke');

run(async (session, _, folderId) => {
const invokeService = new InvokeService(session);
Expand Down
2 changes: 1 addition & 1 deletion examples/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const yaml = require('yaml');
const fs = require('fs');
const path = require('path');
const yc = require('../index');
const yc = require('../src');

function readCliConfig() {
const configFile = path.join(
Expand Down
2 changes: 1 addition & 1 deletion examples/iot_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const run = require('./').run;
const {
RegistryService,
RegistryDataService,
} = require('../api/iot/devices/v1');
} = require('../src/api/iot/devices/v1');

run(async (session, cloudId, folderId) => {
const registryService = new RegistryService(session);
Expand Down
2 changes: 1 addition & 1 deletion examples/kms.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const {
SymmetricKeyService,
SymmetricCryptoService,
SymmetricAlgorithm,
} = require('../api/kms/v1');
} = require('../src/api/kms/v1');

run(async (session, cloudId, folderId) => {
const keyService = new SymmetricKeyService(session);
Expand Down
2 changes: 1 addition & 1 deletion examples/resourcemanager_cloud_list.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const run = require('./').run;
const { CloudService } = require('../api/resourcemanager/v1');
const { CloudService } = require('../src/api/resourcemanager/v1');

run(async (session) => {
const cloudService = new CloudService(session);
Expand Down
2 changes: 1 addition & 1 deletion examples/ydb.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const run = require('./').run;
const { createDriver } = require('../lib/slydb');
const { createDriver } = require('../src/lib/slydb');

run(async (session, _, folderId) => {
const driver = createDriver();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"author": "Yandex LLC",
"license": "MIT",
"main": "index.js",
"main": "dist/index.js",
"bugs": {
"url": "https://github.com/yandex-cloud/nodejs-sdk/issues"
},
Expand Down
2 changes: 1 addition & 1 deletion api/access/index.d.ts → src/api/access/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../index.js';
import { Session } from '../../index';

export interface Subject {
/**
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../../../index.js';
import { Session } from '../../../../index';

export interface TranslatedText {
/**
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../../../index.js';
import { Session } from '../../../../index';

import * as rpc from '../../../../contrib/google/rpc';

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions api/compute/v1/index.d.ts → src/api/compute/v1/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../../index.js';
import { Session } from '../../../index';

import * as protobuf from '../../../contrib/google/protobuf';
import * as operation from '../../../api/operation';
import * as operation from '../../operation';

/**
* A Disk resource. For more information, see [Disks](/docs/compute/concepts/disk).
Expand Down
2 changes: 1 addition & 1 deletion api/compute/v1/index.js → src/api/compute/v1/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = (function() {
const $Writer = $protobuf.Writer;
const $util = $protobuf.util;
let root = {};
require('../../../api/operation');
require('../../operation');
(function($root) {
$root.Disk = (function() {
function Disk(p) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../../../index.js';
import { Session } from '../../../../index';

import * as protobuf from '../../../../contrib/google/protobuf';
import * as operation from '../../../../api/operation';
import * as operation from '../../../operation';

export interface InstanceGroup {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = (function() {
const $Writer = $protobuf.Writer;
const $util = $protobuf.util;
let root = {};
require('../../../../api/operation');
require('../../../operation');
(function($root) {
$root.InstanceGroup = (function() {
function InstanceGroup(p) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../../index.js';
import { Session } from '../../../index';

import * as protobuf from '../../../contrib/google/protobuf';
import * as operation from '../../../api/operation';
import * as access from '../../../api/access';
import * as operation from '../../operation';
import * as access from '../../access';

/**
* A Blob resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module.exports = (function() {
const $Writer = $protobuf.Writer;
const $util = $protobuf.util;
let root = {};
require('../../../api/operation');
require('../../../api/access');
require('../../operation');
require('../../access');
(function($root) {
$root.Blob = (function() {
function Blob(p) {
Expand Down
2 changes: 1 addition & 1 deletion api/endpoint/index.d.ts → src/api/endpoint/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../index.js';
import { Session } from '../../index';

export interface ApiEndpoint {
id?: string;
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions api/iam/v1/index.d.ts → src/api/iam/v1/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../../index.js';
import { Session } from '../../../index';

import * as protobuf from '../../../contrib/google/protobuf';
import * as operation from '../../../api/operation';
import * as operation from '../../operation';
import * as Key from '../../../Key';
import * as access from '../../../api/access';
import * as access from '../../access';

/**
* An ApiKey resource.
Expand Down
4 changes: 2 additions & 2 deletions api/iam/v1/index.js → src/api/iam/v1/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module.exports = (function() {
const $Writer = $protobuf.Writer;
const $util = $protobuf.util;
let root = {};
require('../../../api/operation');
require('../../../api/access');
require('../../operation');
require('../../access');
(function($root) {
$root.ApiKey = (function() {
function ApiKey(p) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../../../index.js';
import { Session } from '../../../../index';

import * as protobuf from '../../../../contrib/google/protobuf';
import * as operation from '../../../../api/operation';
import * as operation from '../../../operation';

/**
* A device. For more information, see [Device](/docs/iot-core/concepts/index#device).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = (function() {
const $Writer = $protobuf.Writer;
const $util = $protobuf.util;
let root = {};
require('../../../../api/operation');
require('../../../operation');
(function($root) {
$root.Device = (function() {
function Device(p) {
Expand Down
4 changes: 2 additions & 2 deletions api/k8s/v1/index.d.ts → src/api/k8s/v1/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../../index.js';
import { Session } from '../../../index';

import * as protobuf from '../../../contrib/google/protobuf';
import * as operation from '../../../api/operation';
import * as operation from '../../operation';
import * as type from '../../../contrib/google/type';

/**
Expand Down
2 changes: 1 addition & 1 deletion api/k8s/v1/index.js → src/api/k8s/v1/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = (function() {
const $Writer = $protobuf.Writer;
const $util = $protobuf.util;
let root = {};
require('../../../api/operation');
require('../../operation');
(function($root) {
$root.Cluster = (function() {
function Cluster(p) {
Expand Down
6 changes: 3 additions & 3 deletions api/kms/v1/index.d.ts → src/api/kms/v1/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../../index.js';
import { Session } from '../../../index';

import * as protobuf from '../../../contrib/google/protobuf';
import * as operation from '../../../api/operation';
import * as access from '../../../api/access';
import * as operation from '../../operation';
import * as access from '../../access';
import * as SymmetricKey from '../../../SymmetricKey';

/**
Expand Down
4 changes: 2 additions & 2 deletions api/kms/v1/index.js → src/api/kms/v1/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module.exports = (function() {
const $Writer = $protobuf.Writer;
const $util = $protobuf.util;
let root = {};
require('../../../api/operation');
require('../../../api/access');
require('../../operation');
require('../../access');
(function($root) {
$root.SymmetricCryptoService = function(session) {
if (session === undefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../../index.js';
import { Session } from '../../../index';

import * as protobuf from '../../../contrib/google/protobuf';
import * as operation from '../../../api/operation';
import * as operation from '../../operation';
import * as NetworkLoadBalancer from '../../../NetworkLoadBalancer';
import * as Listener from '../../../Listener';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = (function() {
const $Writer = $protobuf.Writer;
const $util = $protobuf.util;
let root = {};
require('../../../api/operation');
require('../../operation');
(function($root) {
$root.HealthCheck = (function() {
function HealthCheck(p) {
Expand Down
2 changes: 1 addition & 1 deletion api/operation/index.d.ts → src/api/operation/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../index.js';
import { Session } from '../../index';

import * as protobuf from '../../contrib/google/protobuf';
import * as rpc from '../../contrib/google/rpc';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../../index.js';
import { Session } from '../../../index';

import * as protobuf from '../../../contrib/google/protobuf';
import * as operation from '../../../api/operation';
import * as access from '../../../api/access';
import * as operation from '../../operation';
import * as access from '../../access';

/**
* A Cloud resource. For more information, see [Cloud](/docs/resource-manager/concepts/resources-hierarchy#cloud).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module.exports = (function() {
const $Writer = $protobuf.Writer;
const $util = $protobuf.util;
let root = {};
require('../../../api/operation');
require('../../../api/access');
require('../../operation');
require('../../access');
(function($root) {
$root.Cloud = (function() {
function Cloud(p) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../../../index.js';
import { Session } from '../../../../index';

import * as protobuf from '../../../../contrib/google/protobuf';
import * as operation from '../../../../api/operation';
import * as access from '../../../../api/access';
import * as operation from '../../../operation';
import * as access from '../../../access';

/**
* A serverless function. For details about the concept, see [Functions](/docs/functions/concepts/function).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module.exports = (function() {
const $Writer = $protobuf.Writer;
const $util = $protobuf.util;
let root = {};
require('../../../../api/operation');
require('../../../../api/access');
require('../../../operation');
require('../../../access');
(function($root) {
$root.Function = (function() {
function Function(p) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import * as grpc from 'grpc';
import { util } from 'protobufjs';
import Long = util.Long;
import * as events from 'events';
import { Session } from '../../../../index.js';
import { Session } from '../../../../index';

import * as protobuf from '../../../../contrib/google/protobuf';
import * as operation from '../../../../api/operation';
import * as operation from '../../../operation';
import * as Trigger from '../../../../Trigger';

export interface Predicate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = (function() {
const $Writer = $protobuf.Writer;
const $util = $protobuf.util;
let root = {};
require('../../../../api/operation');
require('../../../operation');
(function($root) {
$root.Predicate = (function() {
function Predicate(p) {
Expand Down
Loading

0 comments on commit 55bf685

Please sign in to comment.